package com.ms.teapuesto.service;

import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.HtmlInput;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import com.google.common.base.Function;
import com.google.common.base.Predicate;
import com.google.common.collect.Collections2;
import com.ms.teapuesto.bean.*;
import com.ms.teapuesto.domain.qrymapper.EventoQryMapper;
import com.ms.teapuesto.domain.qrymapper.FechaQryMapper;
import com.ms.teapuesto.domain.viewmodel.TeApuestoRsl;
import com.ms.teapuesto.domain.viewmodel.TeApuestoFlt;
import com.ms.teapuesto.model.*;
import com.ms.teapuesto.persistence.jpa.*;
import com.ms.teapuesto.util.DateUtil;
import com.ms.teapuesto.util.HtmlUtil;
import com.ms.teapuesto.util.NumberUtil;
import com.ms.teapuesto.util.StringUtil;
import org.apache.commons.lang.StringUtils;
import org.joda.time.DateTime;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.BeanWrapper;
import org.springframework.beans.BeanWrapperImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;

/**
 * Created by RAZANERO on 2/09/14.
 */
@Component
public class EventoServiceImpl implements EventoService {

    private static final Logger LOG = LoggerFactory.getLogger(EventoServiceImpl.class);
    @Autowired
    private DrawDataRepository drawDataRepository;

    @Autowired
    private EventoRepository eventoRepository;

    @Autowired
    private AnalisisService analisisService;

    @Autowired
    private EventoQryMapper eventoQryMapper;

    @Autowired
    private EquipoRepository equipoRepository;
    @Autowired
    private FechaRepository fechaRepository;

    @Autowired
    private PronosticoRepository pronosticoRepository;

    @Autowired
    private FechaQryMapper fechaQryMapper;

    @Autowired
    LigaService ligaService;

    @Autowired
    EquipoService equipoService;

    @Override
    @Transactional
    public void asignarPronostico() {
        List<TeApuestoRsl> eventList = eventoQryMapper.getUltEventosListSinPronostico(null);
        for (TeApuestoRsl teApuestoRsl : eventList) {
            completarBeansEquiposBase(teApuestoRsl);
            asignarPredictzFinalIntern(teApuestoRsl);
        }

    }

    @Override
    @Transactional
    public void asignarWinDrawWin() {
        List<TeApuestoRsl> eventList = eventoQryMapper.getUltEventosListSinPronostico(null);
        for (TeApuestoRsl teApuestoRsl : eventList) {
            completarBeansEquiposBase(teApuestoRsl);
            asignarWinDrawWinFinalIntern(teApuestoRsl);
        }

    }

    @Override
    @Transactional
    public void marcarFavorito(TeApuestoRsl teApuestoRsl) {

        Evento evento = eventoRepository.findOne(new EventoPK(teApuestoRsl.getDrawId(), teApuestoRsl.getEventId()));
        evento.setInFavorito(teApuestoRsl.getEventoBean().getInFavorito());
        eventoRepository.save(evento);
    }

    @Override
    public void analizarUltEventos() {
        Date fechaInicio = DateUtil.truncDay(new Date());
        TeApuestoFlt teApuestoFlt = new TeApuestoFlt();
        teApuestoFlt.setFechaInicio(fechaInicio);
        teApuestoFlt.setFechaFin(new DateTime(fechaInicio).plusDays(5).toDate());

        List<TeApuestoRsl> eventoList = eventoQryMapper.getEventoList(teApuestoFlt);

        LOG.info("Total de eventos <" + eventoList.size() + ">");

        List<Fecha> fechaList = fechaRepository.buscarRemontada("L/V");

        Set<String> visitanteGanador = new HashSet<String>(Collections2.transform(fechaList, new Function<Fecha, String>() {
            public String apply(Fecha fecha) {
                return fecha.getEquipo2();
            }
        }));

        Set<String> localPerdedor = new HashSet<String>(Collections2.transform(fechaList, new Function<Fecha, String>() {
            public String apply(Fecha fecha) {
                return fecha.getEquipo1();
            }
        }));

        fechaList = fechaRepository.buscarRemontada("V/L");

        Set<String> localGanador = new HashSet<String>(Collections2.transform(fechaList, new Function<Fecha, String>() {
            public String apply(Fecha fecha) {
                return fecha.getEquipo1();
            }
        }));

        Set<String> visitantePerdedor = new HashSet<String>(Collections2.transform(fechaList, new Function<Fecha, String>() {
            public String apply(Fecha fecha) {
                return fecha.getEquipo2();
            }
        }));

        for (TeApuestoRsl teApuestoRsl : eventoList) {
            completarBeansEquipos(teApuestoRsl);
            teApuestoRsl.calcularResultado();
            analizarRemontada(teApuestoRsl, localGanador,
                    localPerdedor,
                    visitanteGanador,
                    visitantePerdedor);
            Evento evento = eventoRepository.findOne(new EventoPK(teApuestoRsl.getDrawId(), teApuestoRsl.getEventId()));
            BeanUtils.copyProperties(teApuestoRsl.getEventoBean(), evento);
            eventoRepository.save(evento);
        }
    }

    public List<TeApuestoRsl> getEventoRemontadaList(TeApuestoFlt teApuestoFlt) {
        List<TeApuestoRsl> eventoList = getEventoList(teApuestoFlt);
        List<Fecha> fechaList = fechaRepository.buscarRemontada("LV");

        Set<String> visitanteGanador = new HashSet<String>(Collections2.transform(fechaList, new Function<Fecha, String>() {
            public String apply(Fecha fecha) {
                return fecha.getEquipo2();
            }
        }));

        Set<String> localPerdedor = new HashSet<String>(Collections2.transform(fechaList, new Function<Fecha, String>() {
            public String apply(Fecha fecha) {
                return fecha.getEquipo1();
            }
        }));

        fechaList = fechaRepository.buscarRemontada("VL");

        Set<String> localGanador = new HashSet<String>(Collections2.transform(fechaList, new Function<Fecha, String>() {
            public String apply(Fecha fecha) {
                return fecha.getEquipo2();
            }
        }));

        Set<String> visitantePerdedor = new HashSet<String>(Collections2.transform(fechaList, new Function<Fecha, String>() {
            public String apply(Fecha fecha) {
                return fecha.getEquipo1();
            }
        }));
        List<TeApuestoRsl> result = new ArrayList<TeApuestoRsl>();
        for (TeApuestoRsl teApuestoRsl : eventoList) {
            try {

                if (localGanador.contains(teApuestoRsl.getEquipoLocal().getNombreLiveScore())
                        && teApuestoRsl.getEventoBean().getResultadoVisita1t().doubleValue() >= 50.0
                        && teApuestoRsl.getEventoBean().getResultadoLocalUlt().doubleValue() >= 50.0
                        ) {
                    teApuestoRsl.addRemontada("VL");
                }

                if (localPerdedor.contains(teApuestoRsl.getEquipoLocal().getNombreLiveScore())
                        && teApuestoRsl.getEventoBean().getResultadoLocal1t().doubleValue() >= 50.0
                        && teApuestoRsl.getEventoBean().getResultadoVisitaUlt().doubleValue() >= 50.0
                        ) {
                    teApuestoRsl.addRemontada("LV");
                }

                if (visitanteGanador.contains(teApuestoRsl.getEquipoVisita().getNombreLiveScore())
                        && teApuestoRsl.getEventoBean().getResultadoLocal1t().doubleValue() >= 50.0
                        && teApuestoRsl.getEventoBean().getResultadoVisitaUlt().doubleValue() >= 50.0
                        ) {
                    teApuestoRsl.addRemontada("LV");
                }
                if (visitantePerdedor.contains(teApuestoRsl.getEquipoVisita().getNombreLiveScore())
                        && teApuestoRsl.getEventoBean().getResultadoVisita1t().doubleValue() >= 50.0
                        && teApuestoRsl.getEventoBean().getResultadoLocalUlt().doubleValue() >= 50.0) {
                    teApuestoRsl.addRemontada("VL");
                }
                if (StringUtils.isNotBlank(teApuestoRsl.getEventoBean().getRemontada())) {
                    result.add(teApuestoRsl);
                }
            } catch (Exception ex) {
                LOG.error("exx", ex);
            }
        }

        return result;
    }

    public List<TeApuestoRsl> getEventoList(final TeApuestoFlt teApuestoFlt) {

        List<TeApuestoRsl> eventoList = eventoQryMapper.getEventoList(teApuestoFlt);
        LOG.info("Total de eventos <" + eventoList.size() + ">");


        for (TeApuestoRsl teApuestoRsl : eventoList) {
            completarBeansEquiposbySearch(teApuestoRsl);
        }

        Collection<TeApuestoRsl> result = aplicarFiltros(eventoList, teApuestoFlt);

        return new ArrayList<TeApuestoRsl>(result);
    }

    private Collection<TeApuestoRsl> aplicarFiltros(List<TeApuestoRsl> eventoList, final TeApuestoFlt teApuestoFlt) {
        Collection<TeApuestoRsl> result = new ArrayList<TeApuestoRsl>();

        result = Collections2.filter(eventoList, new Predicate<TeApuestoRsl>() {
            public boolean apply(TeApuestoRsl teApuestoRsl) {
                boolean validar = Boolean.TRUE.equals(teApuestoFlt.getPrimeros5());
                return !validar
                        || (teApuestoRsl.getEventoBean().getLocalPosicionUlt8() != null && teApuestoRsl.getEventoBean().getLocalPosicionUlt8() <= 5)
                        || (teApuestoRsl.getEventoBean().getVisitaPosicionUlt8() != null && teApuestoRsl.getEventoBean().getVisitaPosicionUlt8() <= 5);
            }
        });

        result = Collections2.filter(result, new Predicate<TeApuestoRsl>() {
            public boolean apply(TeApuestoRsl teApuestoRsl) {
                boolean validar = Boolean.TRUE.equals(teApuestoFlt.getGoles());
                return !validar || teApuestoRsl.esGoles(teApuestoFlt.getMayor(), teApuestoFlt.getCantidadGoles());
            }
        });
        result = Collections2.filter(result, new Predicate<TeApuestoRsl>() {
            public boolean apply(TeApuestoRsl teApuestoRsl) {
                boolean validar = Boolean.TRUE.equals(teApuestoFlt.getInPronostico());
                return !validar || StringUtils.isNotBlank(teApuestoRsl.getEventoBean().getPronostico())
                        || StringUtils.isNotBlank(teApuestoRsl.getEventoBean().getPronosticoWinDrawWin());
            }
        });

        result = Collections2.filter(result, new Predicate<TeApuestoRsl>() {
            public boolean apply(TeApuestoRsl teApuestoRsl) {
                boolean validar = Boolean.TRUE.equals(teApuestoFlt.getInPronosticoIgual());
                if (teApuestoRsl.getEventoBean() == null) return false;
                try {
                    return !validar ||
                            (StringUtils.isNotBlank(teApuestoRsl.getResultSimple())
                                    && teApuestoRsl.getResultSimple().equals(teApuestoRsl.getEventoBean().getPronosticoResult()))
                            || (StringUtils.isNotBlank(teApuestoRsl.getResultSimple())
                            && teApuestoRsl.getResultSimple().equals(teApuestoRsl.getEventoBean().getPronosticoWinDrawWinResult()))
                            || (StringUtils.isNotBlank(teApuestoRsl.getResultFinalSimple())
                            && teApuestoRsl.getResultFinalSimple().equals(teApuestoRsl.getEventoBean().getPronosticoResult()))
                            || (StringUtils.isNotBlank(teApuestoRsl.getResultFinalSimple())
                            && teApuestoRsl.getResultFinalSimple().equals(teApuestoRsl.getEventoBean().getPronosticoWinDrawWinResult()));
                } catch (Throwable e) {
                    System.out.println("Xx");
                }
                return false;
            }
        });

        result = Collections2.filter(result, new Predicate<TeApuestoRsl>() {
            public boolean apply(TeApuestoRsl teApuestoRsl) {
                boolean validar = StringUtils.isNotBlank(teApuestoFlt.getPronosticoResultado());
                if (teApuestoRsl.getEventoBean() == null) return false;
                try {
                    return !validar ||
                            teApuestoFlt.getPronosticoResultado().equals(teApuestoRsl.getEventoBean().getPronosticoResult())
                            ;
                } catch (Throwable e) {
                    System.out.println("Xx");
                }
                return false;
            }
        });

 result = Collections2.filter(result, new Predicate<TeApuestoRsl>() {
            public boolean apply(TeApuestoRsl teApuestoRsl) {
                boolean validar = StringUtils.isNotBlank(teApuestoFlt.getPronosticoMarcador());
                if (teApuestoRsl.getEventoBean() == null) return false;
                try {
                    return !validar ||
                            teApuestoFlt.getPronosticoMarcador().equals(teApuestoRsl.getEventoBean().getPronostico())
                            || teApuestoFlt.getPronosticoMarcador().equals(teApuestoRsl.getEventoBean().getPronosticoWinDrawWin())
                            ;
                } catch (Throwable e) {
                    System.out.println("Xx");
                }
                return false;
            }
        });

        result = Collections2.filter(result, new Predicate<TeApuestoRsl>() {
            public boolean apply(TeApuestoRsl teApuestoRsl) {
                boolean validar = Boolean.TRUE.equals(teApuestoFlt.getInFavorito());
                return !validar || teApuestoRsl.esFavorito();
            }
        });

        result = Collections2.filter(result, new Predicate<TeApuestoRsl>() {
            public boolean apply(TeApuestoRsl teApuestoRsl) {
                boolean validar = Boolean.TRUE.equals(teApuestoFlt.getSuperGoles());
                return !validar || teApuestoRsl.esSuperGoles();
            }
        });

        result = Collections2.filter(result, new Predicate<TeApuestoRsl>() {
            public boolean apply(TeApuestoRsl teApuestoRsl) {
                boolean validar = Boolean.TRUE.equals(teApuestoFlt.getRemontada());
                return !validar || teApuestoRsl.esRemontada();
            }
        });

        result = Collections2.filter(result, new Predicate<TeApuestoRsl>() {
            public boolean apply(TeApuestoRsl teApuestoRsl) {
                boolean validar = Boolean.TRUE.equals(teApuestoFlt.getPosibleRemontada());
                return !validar || teApuestoRsl.esPosibleRemontada();
            }
        });

        result = Collections2.filter(result, new Predicate<TeApuestoRsl>() {
            public boolean apply(TeApuestoRsl teApuestoRsl) {
                boolean validar = StringUtils.isNotBlank(teApuestoFlt.getResultadoFinal());
                if (teApuestoRsl.getEventoBean() == null) return false;
                return !validar ||
                        StringUtils.isNotBlank(teApuestoRsl.getEventoBean().getResultFinalDouble()) && teApuestoRsl.getEventoBean().getResultFinalDouble().equals(teApuestoFlt.getResultadoFinal())
                        || (StringUtils.isNotBlank(teApuestoRsl.getEventoBean().getResultFinalSimple()) && teApuestoRsl.getEventoBean().getResultFinalSimple().equals(teApuestoFlt.getResultadoFinal()));
            }
        });

        result = Collections2.filter(result, new Predicate<TeApuestoRsl>() {
            public boolean apply(TeApuestoRsl teApuestoRsl) {
                boolean validar = StringUtils.isNotBlank(teApuestoFlt.getResultadoDeseado());
                if (teApuestoRsl.getEventoBean() == null) return false;
                return !validar || StringUtils.isNotBlank(teApuestoRsl.getEventoBean().getResultSimple()) && teApuestoRsl.getEventoBean().getResultSimple().equals(teApuestoFlt.getResultadoDeseado())
                        || StringUtils.isNotBlank(teApuestoRsl.getEventoBean().getResultDoble()) && teApuestoRsl.getEventoBean().getResultDoble().equals(teApuestoFlt.getResultadoDeseado())
                        ;
            }
        });

        result = Collections2.filter(result, new Predicate<TeApuestoRsl>() {
            public boolean apply(TeApuestoRsl teApuestoRsl) {
                boolean validar = NumberUtil.nvl(teApuestoFlt.getPorcentaje1T()).doubleValue() > 0;
                return !validar || teApuestoRsl.esResultado1t(teApuestoFlt.getPorcentaje1T());
            }
        });

        result = Collections2.filter(result, new Predicate<TeApuestoRsl>() {
            public boolean apply(TeApuestoRsl teApuestoRsl) {
                boolean validar = NumberUtil.nvl(teApuestoFlt.getPorcentajeAcierto()).doubleValue() > 0;
                return !validar || teApuestoRsl.esAcierto(teApuestoFlt.getPorcentajeAcierto());
            }
        });

        result = Collections2.filter(result, new Predicate<TeApuestoRsl>() {
            public boolean apply(TeApuestoRsl teApuestoRsl) {
                boolean validar = NumberUtil.nvl(teApuestoFlt.getPorcentajeLV()).doubleValue() > 0;
                return !validar || teApuestoRsl.esResultadoLocalVisita(teApuestoFlt.getPorcentajeLV());
            }
        });

        result = Collections2.filter(result, new Predicate<TeApuestoRsl>() {
            public boolean apply(TeApuestoRsl teApuestoRsl) {
                boolean validar = NumberUtil.nvl(teApuestoFlt.getPorcentajeUlt8()).doubleValue() > 0;
                return !validar || teApuestoRsl.esResultadoUlt8(teApuestoFlt.getPorcentajeUlt8());
            }
        });

        result = Collections2.filter(result, new Predicate<TeApuestoRsl>() {
            public boolean apply(TeApuestoRsl teApuestoRsl) {
                boolean validar = teApuestoFlt.getDifSimple() != null && teApuestoFlt.getDifSimple();
                if (!validar) return true;
                if (StringUtils.isBlank(teApuestoRsl.getResultFinalDouble())) return true;

                if (StringUtils.isNotBlank(teApuestoRsl.getResultSimple())) {
                    if (teApuestoRsl.getResultSimple().equals("+3")) {
                        return teApuestoRsl.getTotalGoles().doubleValue() < 3;
                    } else {
                        return !teApuestoRsl.getResultFinalSimple().equals(teApuestoRsl.getResultSimple());
                    }
                }
                return false;

            }
        });
        result = Collections2.filter(result, new Predicate<TeApuestoRsl>() {
            public boolean apply(TeApuestoRsl teApuestoRsl) {
                boolean validar = teApuestoFlt.getDifDoble() != null && teApuestoFlt.getDifDoble();
                return !validar || (StringUtils.isNotBlank(teApuestoRsl.getResultFinalDouble())
                        && !teApuestoRsl.getResultFinalDouble().equals(teApuestoRsl.getResultDoble()));
            }
        });

        result = Collections2.filter(result, new Predicate<TeApuestoRsl>() {
            public boolean apply(TeApuestoRsl teApuestoRsl) {
                boolean validar = teApuestoFlt.getIgualSimple() != null && teApuestoFlt.getIgualSimple();
                return !validar || (StringUtils.isNotBlank(teApuestoRsl.getResultFinalSimple())
                        && teApuestoRsl.getResultFinalSimple().equals(teApuestoRsl.getResultSimple()));
            }
        });

        result = Collections2.filter(result, new Predicate<TeApuestoRsl>() {
            public boolean apply(TeApuestoRsl teApuestoRsl) {
                boolean validar = teApuestoFlt.getIgualDoble() != null && teApuestoFlt.getIgualDoble();
                return !validar || (StringUtils.isNotBlank(teApuestoRsl.getResultFinalDouble())
                        && teApuestoRsl.getResultFinalDouble().equals(teApuestoRsl.getResultDoble()));
            }
        });

        result = Collections2.filter(result, new Predicate<TeApuestoRsl>() {
            public boolean apply(TeApuestoRsl teApuestoRsl) {
                boolean validar = teApuestoFlt.getSinResultado() != null && teApuestoFlt.getSinResultado();
                return !validar || (StringUtils.isBlank(teApuestoRsl.getResultFinalSimple()));
            }
        });

        result = Collections2.filter(result, new Predicate<TeApuestoRsl>() {
            public boolean apply(TeApuestoRsl teApuestoRsl) {
                boolean validar =
                        NumberUtil.nvl(teApuestoFlt.getCuotaMenor()).compareTo(BigDecimal.ZERO) != 0
                                && NumberUtil.nvl(teApuestoFlt.getCuotaMayor()).compareTo(BigDecimal.ZERO) != 0;

                EventoBean eventoBean = teApuestoRsl.getEventoBean();

                return !validar || (eventoBean != null &&
                        eventoBean.getProbabilidadPara(eventoBean.getResultSimple()).compareTo(teApuestoFlt.getCuotaMenor()) >= 0
                        && eventoBean.getProbabilidadPara(eventoBean.getResultSimple()).compareTo(teApuestoFlt.getCuotaMayor()) <= 0
                );
            }
        });

        return result;
    }

    private void analizarRemontada(TeApuestoRsl teApuestoRsl,
                                   Set<String> localGanador,
                                   Set<String> localPerdedor,
                                   Set<String> visitanteGanador,
                                   Set<String> visitantePerdedor
    ) {
        if (teApuestoRsl.getEquipoLocal() == null || teApuestoRsl.getEquipoVisita() == null) {

            return;
        }
        if (localGanador.contains(teApuestoRsl.getEquipoLocal().getNombreLiveScore())) {
            teApuestoRsl.addRemontada("V/L");
        }
        if (teApuestoRsl.getEventoBean().getResultadoVisita1tUlt().doubleValue() >= 40.0
                && teApuestoRsl.getEventoBean().getResultadoLocal1tUlt().doubleValue() < 40.0
                && teApuestoRsl.getEventoBean().getResultadoLocalUlt().doubleValue() >= 50.0
                && teApuestoRsl.getEventoBean().getResultadoVisitaUlt().doubleValue() < 40.0
                ) {
            teApuestoRsl.addRemontada("+");
        }
        if (visitantePerdedor.contains(teApuestoRsl.getEquipoVisita().getNombreLiveScore())
                ) {
            teApuestoRsl.addRemontada("V/L");
        }
        if (teApuestoRsl.getEventoBean().getResultadoVisita1t().doubleValue() >= 40.0
                && teApuestoRsl.getEventoBean().getResultadoLocal1t().doubleValue() < 40.0
                && teApuestoRsl.getEventoBean().getResultadoLocalUlt().doubleValue() >= 50.0
                && teApuestoRsl.getEventoBean().getResultadoVisitaUlt().doubleValue() < 40.0

                ) {
            teApuestoRsl.addRemontada("+");
        }

        if (localPerdedor.contains(teApuestoRsl.getEquipoLocal().getNombreLiveScore())
                ) {
            teApuestoRsl.addRemontada("L/V");
        }

        if (teApuestoRsl.getEventoBean().getResultadoLocal1t().doubleValue() >= 40.0
                && teApuestoRsl.getEventoBean().getResultadoVisita1t().doubleValue() < 40.0
                && teApuestoRsl.getEventoBean().getResultadoVisitaUlt().doubleValue() >= 50.0
                && teApuestoRsl.getEventoBean().getResultadoLocalUlt().doubleValue() < 40.0
                ) {
            teApuestoRsl.addRemontada("+");
        }


        if (visitanteGanador.contains(teApuestoRsl.getEquipoVisita().getNombreLiveScore())
                ) {
            teApuestoRsl.addRemontada("L/V");
        }
        if (teApuestoRsl.getEventoBean().getResultadoLocal1tUlt().doubleValue() >= 40.0
                && teApuestoRsl.getEventoBean().getResultadoVisita1tUlt().doubleValue() < 40.0
                && teApuestoRsl.getEventoBean().getResultadoVisitaUlt().doubleValue() >= 50.0
                && teApuestoRsl.getEventoBean().getResultadoLocalUlt().doubleValue() < 40.0
                ) {
            teApuestoRsl.addRemontada("+");
        }

    }

    private void completarBeansEquiposBase(TeApuestoRsl teApuestoRsl) {
        EventoPK eventoPK = new EventoPK(teApuestoRsl.getDrawId(), teApuestoRsl.getEventId());
        Evento evento = eventoRepository.findOne(eventoPK);

        EventoBean eventoBean = new EventoBean();
        BeanUtils.copyProperties(evento, eventoBean);

        teApuestoRsl.setEventoBean(eventoBean);

        if (StringUtils.isNotBlank(teApuestoRsl.getEventoBean().getEquipo1())) {
            asignarEquipoLocal(teApuestoRsl);
        }
        if (StringUtils.isNotBlank(teApuestoRsl.getEventoBean().getEquipo2())) {
            asignarEquipoVisita(teApuestoRsl);
        }

    }

    private void completarBeansEquipos(TeApuestoRsl teApuestoRsl) {

        EventoPK eventoPK = new EventoPK(teApuestoRsl.getDrawId(), teApuestoRsl.getEventId());
        Evento evento = eventoRepository.findOne(eventoPK);

        EventoBean eventoBean = new EventoBean();
        BeanUtils.copyProperties(evento, eventoBean);

        teApuestoRsl.setEventoBean(eventoBean);

        if (StringUtils.isNotBlank(teApuestoRsl.getEventoBean().getEquipo1())) {
            asignarEquipoLocal(teApuestoRsl);
        }
        if (StringUtils.isNotBlank(teApuestoRsl.getEventoBean().getEquipo2())) {
            asignarEquipoVisita(teApuestoRsl);
        }

        FechaBean fechaBean = buscarFecha(teApuestoRsl);
        if (fechaBean != null) {
            teApuestoRsl.setFechaBean(fechaBean);
        }

    }

    private void completarBeansEquiposbySearch(TeApuestoRsl teApuestoRsl) {

        EventoPK eventoPK = new EventoPK(teApuestoRsl.getDrawId(), teApuestoRsl.getEventId());
        Evento evento = eventoRepository.findOne(eventoPK);

        EventoBean eventoBean = new EventoBean();
        BeanUtils.copyProperties(evento, eventoBean);

        teApuestoRsl.setEventoBean(eventoBean);

        if (StringUtils.isNotBlank(teApuestoRsl.getEventoBean().getEquipo1())) {
            asignarEquipoLocal(teApuestoRsl);
        }
        if (StringUtils.isNotBlank(teApuestoRsl.getEventoBean().getEquipo2())) {
            asignarEquipoVisita(teApuestoRsl);
        }

    }

    private void asignarPredictzFinalIntern(TeApuestoRsl teApuestoRsl) {
        DateTime dt = new DateTime();
        dt = dt.withHourOfDay(23);
        dt = dt.withMinuteOfHour(59);
        dt = dt.minusDays(1);
        if (teApuestoRsl.getEquipoLocal() == null || teApuestoRsl.getEquipoVisita() == null) {
            return;
        }

        String equipo1 = StringUtils.isNotBlank(teApuestoRsl.getEquipoLocal().getAlias_livescore()) ? teApuestoRsl.getEquipoLocal().getAlias_livescore() + ";" + teApuestoRsl.getEquipoLocal().getNombre() : teApuestoRsl.getEquipoLocal().getNombre();
        String equipo2 = StringUtils.isNotBlank(teApuestoRsl.getEquipoVisita().getAlias_livescore()) ? teApuestoRsl.getEquipoVisita().getAlias_livescore() + ";" + teApuestoRsl.getEquipoVisita().getNombre() : teApuestoRsl.getEquipoVisita().getNombre();

        String[] equipo1List = StringUtils.split(equipo1, ";");
        String[] equipo2List = StringUtils.split(equipo2, ";");
        List<Pronostico> fecha = new ArrayList<Pronostico>();
        for (String anEquipo1List : equipo1List) {
            for (String anEquipo2List : equipo2List) {
                LOG.info("search -> <" + anEquipo1List + "> vs <" + anEquipo2List + ">");
                if (StringUtils.isBlank(teApuestoRsl.getLeagueNombre())) {
                    continue;
                }

                fecha.addAll(pronosticoRepository.buscarPartido(
                        "PREDICTZ",
                        teApuestoRsl.getLeagueNombre(),
                        anEquipo1List,
                        anEquipo2List
                ));

            }

        }
        SimpleDateFormat sdf = new SimpleDateFormat("MM/yyyy");
        if (fecha.size() > 0) {
            for (Iterator<Pronostico> iterator = fecha.iterator(); iterator.hasNext(); ) {
                Pronostico next = iterator.next();
                if (sdf.format(next.getFecha()).equals(sdf.format(teApuestoRsl.getEventoBean().getFecha()))) {
                    EventoPK eventoPK = new EventoPK(teApuestoRsl.getDrawId(), teApuestoRsl.getEventId());
                    Evento evento = eventoRepository.findOne(eventoPK);
                    evento.setPronostico(next.getResultado());
                    eventoRepository.save(evento);
                    next.setInUsado("1");
                    pronosticoRepository.save(next);
                    break;
                } else {
                    LOG.error("Fecha no encontrada con <" + equipo1 + "> <" + equipo2 + ">" + teApuestoRsl + " " + sdf.format(next.getFecha()) + "<>" + sdf.format(teApuestoRsl.getEventoBean().getFecha()));
                }
            }
        } else {
            if (teApuestoRsl.getEventoBean().getFecha().getTime() < dt.toDate().getTime()) {
                LOG.error("Fecha no encontrada con <" + equipo1 + "> <" + equipo2 + ">" + teApuestoRsl);
            }
        }

    }

    private void asignarWinDrawWinFinalIntern(TeApuestoRsl teApuestoRsl) {
        DateTime dt = new DateTime();
        dt = dt.withHourOfDay(23);
        dt = dt.withMinuteOfHour(59);
        dt = dt.minusDays(1);
        if (teApuestoRsl.getEquipoLocal() == null || teApuestoRsl.getEquipoVisita() == null) {
            return;
        }

        String equipo1 = StringUtils.isNotBlank(teApuestoRsl.getEquipoLocal().getAlias_livescore()) ? teApuestoRsl.getEquipoLocal().getAlias_livescore() + ";" + teApuestoRsl.getEquipoLocal().getNombre() : teApuestoRsl.getEquipoLocal().getNombre();
        String equipo2 = StringUtils.isNotBlank(teApuestoRsl.getEquipoVisita().getAlias_livescore()) ? teApuestoRsl.getEquipoVisita().getAlias_livescore() + ";" + teApuestoRsl.getEquipoVisita().getNombre() : teApuestoRsl.getEquipoVisita().getNombre();

        String[] equipo1List = StringUtils.split(equipo1, ";");
        String[] equipo2List = StringUtils.split(equipo2, ";");
        List<Pronostico> fecha = new ArrayList<Pronostico>();
        for (String anEquipo1List : equipo1List) {
            for (String anEquipo2List : equipo2List) {
                LOG.info("search -> <" + anEquipo1List + "> vs <" + anEquipo2List + ">");
                if (StringUtils.isBlank(teApuestoRsl.getLeagueNombre())) {
                    continue;
                }

                fecha.addAll(pronosticoRepository.buscarPartido(
                        "WINDRAWWIN",
                        teApuestoRsl.getLeagueNombre(),
                        anEquipo1List,
                        anEquipo2List
                ));

            }

        }
        SimpleDateFormat sdf = new SimpleDateFormat("MM/yyyy");
        if (fecha.size() > 0) {
            for (Pronostico next : fecha) {
                if (sdf.format(next.getFecha()).equals(sdf.format(teApuestoRsl.getEventoBean().getFecha()))) {
                    EventoPK eventoPK = new EventoPK(teApuestoRsl.getDrawId(), teApuestoRsl.getEventId());
                    Evento evento = eventoRepository.findOne(eventoPK);
                    evento.setPronosticoWinDrawWin(next.getResultado());
                    eventoRepository.save(evento);
                    next.setInUsado("1");
                    pronosticoRepository.save(next);
                    break;
                } else {
                    LOG.error("Fecha no encontrada con <" + equipo1 + "> <" + equipo2 + ">" + teApuestoRsl + " " + sdf.format(next.getFecha()) + "<>" + sdf.format(teApuestoRsl.getEventoBean().getFecha()));
                }
            }
        } else {
            if (teApuestoRsl.getEventoBean().getFecha().getTime() < dt.toDate().getTime()) {
                LOG.error("Fecha no encontrada con <" + equipo1 + "> <" + equipo2 + ">" + teApuestoRsl);
            }
        }

    }

    private void asignarResultadoFinalIntern(TeApuestoRsl teApuestoRsl) {
        DateTime dt = new DateTime();
        dt = dt.withHourOfDay(23);
        dt = dt.withMinuteOfHour(59);
        dt = dt.minusDays(1);
        if (teApuestoRsl.getEquipoLocal() == null || teApuestoRsl.getEquipoVisita() == null) {
            return;
        }

        String equipo1 = StringUtils.isNotBlank(teApuestoRsl.getEquipoLocal().getAlias_livescore()) ? teApuestoRsl.getEquipoLocal().getAlias_livescore() + ";" + teApuestoRsl.getEquipoLocal().getNombre() : teApuestoRsl.getEquipoLocal().getNombre();
        String equipo2 = StringUtils.isNotBlank(teApuestoRsl.getEquipoVisita().getAlias_livescore()) ? teApuestoRsl.getEquipoVisita().getAlias_livescore() + ";" + teApuestoRsl.getEquipoVisita().getNombre() : teApuestoRsl.getEquipoVisita().getNombre();

        String[] equipo1List = StringUtils.split(equipo1, ";");
        String[] equipo2List = StringUtils.split(equipo2, ";");
        List<Fecha> fecha = new ArrayList<Fecha>();
        for (String anEquipo1List : equipo1List) {
            for (String anEquipo2List : equipo2List) {
                LOG.info("search -> <" + anEquipo1List + "> vs <" + anEquipo2List + ">");
                fecha.addAll(fechaRepository.buscarPartido(
                        teApuestoRsl.getLeagueNombre(),
                        anEquipo1List,
                        anEquipo2List
                ));

                if (StringUtils.isBlank(teApuestoRsl.getLeagueNombre())) {
                    continue;
                }
                if (fecha.size() == 0 && teApuestoRsl.getLeagueNombre().equals("Argentina2")) {
                    fecha = fechaRepository.buscarPartido(
                            "Argentina3",
                            anEquipo1List,
                            anEquipo2List
                    );
                }
            }

        }
        SimpleDateFormat sdf = new SimpleDateFormat("MM/yyyy");
        if (fecha.size() > 0) {
            for (Iterator<Fecha> iterator = fecha.iterator(); iterator.hasNext(); ) {
                Fecha next = iterator.next();
                if (sdf.format(next.getFecha()).equals(sdf.format(teApuestoRsl.getEventoBean().getFecha()))) {
                    EventoPK eventoPK = new EventoPK(teApuestoRsl.getDrawId(), teApuestoRsl.getEventId());
                    Evento evento = eventoRepository.findOne(eventoPK);
                    evento.setResultFinalDouble(next.getResultadoDoble());
                    evento.setResultFinalSimple(next.getResultadoDoble().substring(2, 3));
                    evento.setGoles(next.getTotalGoles());
                    next.setDrawId(evento.getDrawId());
                    next.setEventId(evento.getEventId());
                    fechaRepository.save(next);
                    evento.setFechaHashCode(new Long(next.hashCode()));
                    eventoRepository.save(evento);
                    break;
                } else {
                    LOG.error("Fecha no encontrada con <" + equipo1 + "> <" + equipo2 + ">" + teApuestoRsl + " " + sdf.format(next.getFecha()) + "<>" + sdf.format(teApuestoRsl.getEventoBean().getFecha()));
                }
            }
        } else {
            if (teApuestoRsl.getEventoBean().getFecha().getTime() < dt.toDate().getTime()) {
                LOG.error("Fecha no encontrada con <" + equipo1 + "> <" + equipo2 + ">" + teApuestoRsl);
            }
        }
    }

    private FechaBean buscarFecha(TeApuestoRsl teApuestoRsl) {
        DateTime dt = new DateTime();
        dt = dt.withHourOfDay(23);
        dt = dt.withMinuteOfHour(59);
        dt = dt.minusDays(1);
        if (teApuestoRsl.getEquipoLocal() == null || teApuestoRsl.getEquipoVisita() == null) {
            return null;
        }

        String equipo1 = StringUtils.isNotBlank(teApuestoRsl.getEquipoLocal().getAlias_livescore()) ? teApuestoRsl.getEquipoLocal().getAlias_livescore() : teApuestoRsl.getEquipoLocal().getNombre();
        String equipo2 = StringUtils.isNotBlank(teApuestoRsl.getEquipoVisita().getAlias_livescore()) ? teApuestoRsl.getEquipoVisita().getAlias_livescore() : teApuestoRsl.getEquipoVisita().getNombre();

        String[] equipo1List = StringUtils.split(equipo1, ";");
        String[] equipo2List = StringUtils.split(equipo2, ";");
        List<Fecha> fecha = new ArrayList<Fecha>();
        for (String anEquipo1List : equipo1List) {
            for (String anEquipo2List : equipo2List) {
                fecha = fechaRepository.buscarPartido(
                        teApuestoRsl.getLeagueNombre(),
                        anEquipo1List,
                        anEquipo2List
                );
                LOG.info("buscando <" + anEquipo1List + "> vs <" + anEquipo2List + "> result= " + fecha.size());

                if (StringUtils.isBlank(teApuestoRsl.getLeagueNombre())) {
                    continue;
                }
                if (fecha.size() == 0 && teApuestoRsl.getLeagueNombre().equals("Argentina2")) {
                    fecha = fechaRepository.buscarPartido(
                            "Argentina3",
                            anEquipo1List,
                            anEquipo2List
                    );
                }
                if (fecha.size() > 0) break;
            }
            if (fecha.size() > 0) break;
        }

        if (fecha.size() > 0) {
            FechaBean result = new FechaBean();
            BeanUtils.copyProperties(fecha.get(0), result);
            return result;
        } else {
            if (teApuestoRsl.getEventoBean().getFecha().getTime() < dt.toDate().getTime()) {
                LOG.error("Fecha no encontrada con <" + equipo1 + "> <" + equipo2 + ">" + teApuestoRsl);
            }
        }
        return null;
    }

    public static void main(String[] args) {
        SimpleDateFormat sdf = new SimpleDateFormat("EEEEEEEE d 'de' MMMMM 'de' yyyy", Locale.forLanguageTag("ES"));
        String date = "Jueves 20 de noviembre de 2014";
        System.out.println(sdf.format(new Date()));
        System.out.println("20:00".compareTo("21:00"));
        System.out.println("20:00".compareTo("22:00"));
        System.out.println("20:00".compareTo("06:00"));
        System.out.println("20:00".compareTo("20:30"));
        System.out.println("06:00".compareTo("06:30"));
    }


    private void asignarEquipoVisita(TeApuestoRsl teApuestoRsl) {
        Equipo equipo = obtenerEquipo(teApuestoRsl.getLeagueNombre(), teApuestoRsl.getEquipo2());
        if (equipo == null) {
            LOG.error("Equipo no encontrado asignarEquipoVisita" + teApuestoRsl.getLeagueNombre() + " - " + teApuestoRsl.getEquipo2());
        } else {
            EquipoBean equipoBean = new EquipoBean();
            BeanUtils.copyProperties(equipo, equipoBean);
            teApuestoRsl.setEquipoVisita(equipoBean);
        }
    }

    private void asignarEquipoLocal(TeApuestoRsl teApuestoRsl) {
        Equipo equipo = obtenerEquipo(teApuestoRsl.getLeagueNombre(), teApuestoRsl.getEquipo1());
        if (equipo == null) {
            LOG.error("Equipo no encontrado asignarEquipoLocal " + teApuestoRsl.getLeagueNombre() + " - " + teApuestoRsl.getEquipo1());
        } else {
            EquipoBean equipoBean = new EquipoBean();
            BeanUtils.copyProperties(equipo, equipoBean);
            teApuestoRsl.setEquipoLocal(equipoBean);
        }
    }

    private Equipo obtenerEquipo(String leagueNombre, String equipoNombre) {
        Equipo equipo = equipoRepository.findOne(new EquipoPK(leagueNombre, equipoNombre));
        if (equipo == null && "Argentina3".equals(leagueNombre)) {
            equipo = equipoRepository.findOne(new EquipoPK("Argentina2", equipoNombre));
        }
        if (equipo == null && "Argentina2".equals(leagueNombre)) {
            equipo = equipoRepository.findOne(new EquipoPK("Argentina3", equipoNombre));
        }

        if (equipo == null) {
            try {
                List<Equipo> items = equipoRepository.buscarEquipoPorNombre(equipoNombre);
                if (items.size() > 0)
                    equipo = (Equipo) items.get(0);
            } catch (Exception ex) {
                LOG.error("Error al buscar el equipo " + equipoNombre, ex);
            }

        }
        return equipo;
    }

    @Transactional(propagation = Propagation.REQUIRED)
    public void mergeData() {

        Iterator<Programa> programaList = drawDataRepository.findAll().iterator();
        SimpleDateFormat sdf = new SimpleDateFormat("EEEEEEEE d 'de' MMMMM 'de' yyyy");
        SimpleDateFormat sdf_1 = new SimpleDateFormat("dd/MM/yyyy kk:mm");
        SimpleDateFormat sdf_2 = new SimpleDateFormat("dd/MM/yyyy");
        while (programaList.hasNext()) {
            Programa programa = programaList.next();
            List<Evento> eventoList = eventoRepository.getEventoIn(programa.getDrawId());
            String fecha = sdf_2.format(programa.getFecha());
            for (Evento evento : eventoList) {
                String fechaFinal = fecha + " " + evento.getHour();
                try {
                    evento.setFecha(sdf_1.parse(fechaFinal));
                } catch (ParseException e) {
                    e.printStackTrace();
                }
                eventoRepository.save(evento);
            }


        }
    }

    @Transactional(propagation = Propagation.REQUIRED)
    public void descargarPrograma() {
        JSONParser parser = new JSONParser();
        try {
            SimpleDateFormat sdf = new SimpleDateFormat("E d 'de' MMMMM 'de' yyyy", Locale.forLanguageTag("ES"));
            SimpleDateFormat sdf_1 = new SimpleDateFormat("dd/MM/yyyy kk:mm");
            SimpleDateFormat sdf_2 = new SimpleDateFormat("dd/MM/yyyy");
            WebClient webClient = new WebClient();
            webClient.setJavaScriptEnabled(false);
            webClient.setThrowExceptionOnFailingStatusCode(false);
            HtmlPage mainPage = webClient.getPage("https://zonasegura.intralot.com.pe/p/juega-teapuesto.html");
            HtmlInput detalleTable = HtmlUtil.getHtmlInput(mainPage, "b5435566a27c88b4745c39e0b3d91da7");

            Object obj = parser.parse(detalleTable.getValueAttribute());
            JSONObject jsonObject = (JSONObject) obj;
            JSONArray drawDataJsonList = (JSONArray) jsonObject.get("DrawData");
            List<Programa> programaList = new ArrayList<Programa>();

            for (Object aDrawDataJsonList : drawDataJsonList) {
                JSONObject drawDataJson = (JSONObject) aDrawDataJsonList;
                Programa programa = new Programa();
                programa.setDrawId((Long) drawDataJson.get("drawId"));
                programa.setDate((String) drawDataJson.get("date"));
                programa.setFecha(sdf.parse(programa.getDate()));
                List<Evento> eventList = new ArrayList<Evento>();
                JSONArray eventJsonList = (JSONArray) drawDataJson.get("events");
                JSONObject lastEventoDataJson = null;
                int i = 0;
                String lastDate = "";
                boolean aumentarDia = false;
                for (Object aEventJsonList : eventJsonList) {
                    JSONObject eventoJson = (JSONObject) aEventJsonList;
                    if (i > 0) {
                        lastEventoDataJson = (JSONObject) eventJsonList.get(i - 1);
                        lastDate = new SimpleDateFormat("dd/MM").format(sdf.parse(programa.getDate()));
                    }
                    Set propertyNameList = eventoJson.keySet();
                    Evento evento = null;
                    evento = eventoRepository.findOne(new EventoPK(programa.getDrawId(), (Long) eventoJson.get("eventId")));
                    if (evento == null) {
                        evento = new Evento();
                    }
                    evento.setDrawId(programa.getDrawId());
                    Date fechaEvento = sdf.parse(programa.getDate());

                    LOG.info("Procesando la fecha " + fechaEvento + " hora <" + eventoJson.get("hour") + ">");
                    if(!lastDate.equals(new SimpleDateFormat("dd/MM").format(fechaEvento))){
                        aumentarDia=false;
                    }

                    if (aumentarDia || (lastEventoDataJson != null
                            && (((String) lastEventoDataJson.get("hour")).compareTo((String) eventoJson.get("hour"))) > 0)) {
                        DateTime dt = new DateTime(fechaEvento.getTime());
                        fechaEvento = dt.plusDays(1).toDate();
                        LOG.info("nueva fecha " + fechaEvento + " hora <" + eventoJson.get("hour") + ">");
                        aumentarDia = true;
                    }

                    evento.setFecha(sdf_1.parse(sdf_2.format(fechaEvento) + " " + eventoJson.get("hour")));
                    BeanWrapper bw = new BeanWrapperImpl(evento);
                    for (Object aPropertyNameList : propertyNameList) {
                        String propertyName = (String) aPropertyNameList;
                        bw.setPropertyValue(propertyName, eventoJson.get(propertyName));
                    }
                    i++;
                    eventList.add(evento);
                }
                programa.setEventos(new HashSet<Evento>(eventList));
                programaList.add(programa);
            }
            Set<Evento> eventos = new HashSet<Evento>();
            for (Programa programa : programaList) {
                drawDataRepository.save(programa);
                eventos.addAll(programa.getEventos());
            }

            for (Evento evento : eventos) {
                evento.init();
                eventoRepository.save(evento);
            }
            LOG.info("Total de eventos actualizados <" + eventos.size() + ">");

        } catch (Exception e) {
            LOG.error("Error al descargar programa ", e);
        }
    }

    @Transactional(propagation = Propagation.REQUIRED)
    public void descargarProgramaCustom() {
        JSONParser parser = new JSONParser();
        try {
            SimpleDateFormat sdf = new SimpleDateFormat("E d 'de' MMMMM 'de' yyyy", Locale.forLanguageTag("ES"));
            SimpleDateFormat sdf_1 = new SimpleDateFormat("dd/MM/yyyy kk:mm");
            SimpleDateFormat sdf_2 = new SimpleDateFormat("dd/MM/yyyy");

            Object obj = parser.parse("{\"BetData\":{\"status\":\"ACT\",\"message\":\"OK\",\"priceType\":null,\"priceMessage\":\"Costo por apuesta: S/.1\",\"simpleBetPrice\":1,\"promotionType\":null,\"balanceAmount\":1.9,\"balanceAmountGame\":0.0,\"algorithm\":null,\"bets\":null,\"pay\":null,\"draws\":null,\"cost\":null},\"DrawData\":[{\"drawId\":1531,\"date\":\"Martes 14 de abril de 2015\",\"events\":[{\"hour\":\"12:00\",\"eventId\":510,\"leagueId\":\"SU2\",\"minimun\":3,\"teams\":\"Ostersunds - Angelholms\",\"exactGoal\":\"-\",\"local\":\"1.45\",\"equal\":\"3.60\",\"visitor\":\"5.50\",\"localEqual\":\"-\",\"localVisitor\":\"1.15\",\"equalVisitor\":\"2.18\",\"t1tLocal\":\"2.00\",\"t1tEqual\":\"2.15\",\"t1tVisitor\":\"5.60\",\"t1tLocal2tLocal\":\"2.25\",\"t1tEqual2tLocal\":\"3.80\",\"t1tVisitor2tLocal\":\"24.00\",\"t1tLocal2tEqual\":\"17.50\",\"t1tEqual2tEqual\":\"5.75\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"39.00\",\"t1tEqual2tVisitor\":\"12.50\",\"t1tVisitor2tVisitor\":\"11.00\",\"goalLower2\":\"1.70\",\"goalOver3\":\"1.80\",\"goal_0_1\":\"3.10\",\"goal_2_3\":\"1.85\",\"goal4More\":\"2.70\"},{\"hour\":\"13:45\",\"eventId\":500,\"leagueId\":\"CEU\",\"minimun\":1,\"teams\":\"Atletico Madrid - Real Madrid\",\"exactGoal\":\"exact-goal\",\"local\":\"2.45\",\"equal\":\"3.10\",\"visitor\":\"2.35\",\"localEqual\":\"1.37\",\"localVisitor\":\"1.20\",\"equalVisitor\":\"1.34\",\"t1tLocal\":\"3.20\",\"t1tEqual\":\"2.00\",\"t1tVisitor\":\"3.10\",\"t1tLocal2tLocal\":\"4.50\",\"t1tEqual2tLocal\":\"5.75\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"13.50\",\"t1tEqual2tEqual\":\"4.60\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"5.25\",\"t1tVisitor2tVisitor\":\"4.30\",\"goalLower2\":\"1.65\",\"goalOver3\":\"1.85\",\"goal_0_1\":\"2.75\",\"goal_2_3\":\"1.80\",\"goal4More\":\"3.15\"},{\"hour\":\"13:45\",\"eventId\":501,\"leagueId\":\"CEU\",\"minimun\":2,\"teams\":\"Juventus - Monaco\",\"exactGoal\":\"exact-goal\",\"local\":\"1.30\",\"equal\":\"4.25\",\"visitor\":\"7.00\",\"localEqual\":\"-\",\"localVisitor\":\"1.10\",\"equalVisitor\":\"2.64\",\"t1tLocal\":\"1.80\",\"t1tEqual\":\"2.45\",\"t1tVisitor\":\"6.75\",\"t1tLocal2tLocal\":\"1.85\",\"t1tEqual2tLocal\":\"3.90\",\"t1tVisitor2tLocal\":\"24.00\",\"t1tLocal2tEqual\":\"23.00\",\"t1tEqual2tEqual\":\"6.75\",\"t1tVisitor2tEqual\":\"15.50\",\"t1tLocal2tVisitor\":\"60.00\",\"t1tEqual2tVisitor\":\"16.50\",\"t1tVisitor2tVisitor\":\"14.50\",\"goalLower2\":\"1.55\",\"goalOver3\":\"1.95\",\"goal_0_1\":\"2.80\",\"goal_2_3\":\"1.75\",\"goal4More\":\"3.20\"},{\"hour\":\"13:45\",\"eventId\":511,\"leagueId\":\"ING\",\"minimun\":3,\"teams\":\"Birmingham - Blackburn\",\"exactGoal\":\"-\",\"local\":\"2.40\",\"equal\":\"3.10\",\"visitor\":\"2.40\",\"localEqual\":\"1.35\",\"localVisitor\":\"1.20\",\"equalVisitor\":\"1.35\",\"t1tLocal\":\"3.10\",\"t1tEqual\":\"2.00\",\"t1tVisitor\":\"3.10\",\"t1tLocal2tLocal\":\"4.30\",\"t1tEqual2tLocal\":\"5.25\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"14.50\",\"t1tEqual2tEqual\":\"4.60\",\"t1tVisitor2tEqual\":\"13.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"5.25\",\"t1tVisitor2tVisitor\":\"4.30\",\"goalLower2\":\"1.70\",\"goalOver3\":\"1.80\",\"goal_0_1\":\"2.85\",\"goal_2_3\":\"1.80\",\"goal4More\":\"3.00\"},{\"hour\":\"13:45\",\"eventId\":512,\"leagueId\":\"ING\",\"minimun\":3,\"teams\":\"Brighton - Huddersfield\",\"exactGoal\":\"-\",\"local\":\"1.90\",\"equal\":\"3.10\",\"visitor\":\"3.20\",\"localEqual\":\"1.18\",\"localVisitor\":\"1.19\",\"equalVisitor\":\"1.57\",\"t1tLocal\":\"2.55\",\"t1tEqual\":\"2.00\",\"t1tVisitor\":\"3.90\",\"t1tLocal2tLocal\":\"3.20\",\"t1tEqual2tLocal\":\"4.60\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"14.50\",\"t1tEqual2tEqual\":\"4.60\",\"t1tVisitor2tEqual\":\"13.50\",\"t1tLocal2tVisitor\":\"29.00\",\"t1tEqual2tVisitor\":\"6.75\",\"t1tVisitor2tVisitor\":\"6.00\",\"goalLower2\":\"1.70\",\"goalOver3\":\"1.80\",\"goal_0_1\":\"3.00\",\"goal_2_3\":\"1.80\",\"goal4More\":\"2.85\"},{\"hour\":\"13:45\",\"eventId\":513,\"leagueId\":\"ING\",\"minimun\":3,\"teams\":\"Derby County - Blackpool\",\"exactGoal\":\"-\",\"local\":\"1.10\",\"equal\":\"6.25\",\"visitor\":\"12.50\",\"localEqual\":\"-\",\"localVisitor\":\"-\",\"equalVisitor\":\"4.17\",\"t1tLocal\":\"1.35\",\"t1tEqual\":\"3.10\",\"t1tVisitor\":\"12.00\",\"t1tLocal2tLocal\":\"1.40\",\"t1tEqual2tLocal\":\"4.40\",\"t1tVisitor2tLocal\":\"29.00\",\"t1tLocal2tEqual\":\"40.00\",\"t1tEqual2tEqual\":\"11.50\",\"t1tVisitor2tEqual\":\"21.00\",\"t1tLocal2tVisitor\":\"75.00\",\"t1tEqual2tVisitor\":\"37.00\",\"t1tVisitor2tVisitor\":\"34.00\",\"goalLower2\":\"2.20\",\"goalOver3\":\"1.40\",\"goal_0_1\":\"4.90\",\"goal_2_3\":\"1.95\",\"goal4More\":\"1.95\"},{\"hour\":\"13:45\",\"eventId\":514,\"leagueId\":\"ING\",\"minimun\":3,\"teams\":\"Ipswich - Cardiff\",\"exactGoal\":\"-\",\"local\":\"1.55\",\"equal\":\"3.40\",\"visitor\":\"4.75\",\"localEqual\":\"1.06\",\"localVisitor\":\"1.17\",\"equalVisitor\":\"1.98\",\"t1tLocal\":\"2.20\",\"t1tEqual\":\"2.05\",\"t1tVisitor\":\"5.00\",\"t1tLocal2tLocal\":\"2.45\",\"t1tEqual2tLocal\":\"3.90\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"15.50\",\"t1tEqual2tEqual\":\"5.30\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"39.00\",\"t1tEqual2tVisitor\":\"11.00\",\"t1tVisitor2tVisitor\":\"9.00\",\"goalLower2\":\"1.60\",\"goalOver3\":\"1.90\",\"goal_0_1\":\"2.60\",\"goal_2_3\":\"1.75\",\"goal4More\":\"3.65\"},{\"hour\":\"13:45\",\"eventId\":515,\"leagueId\":\"ING\",\"minimun\":3,\"teams\":\"Leeds - Norwich\",\"exactGoal\":\"-\",\"local\":\"5.00\",\"equal\":\"3.50\",\"visitor\":\"1.50\",\"localEqual\":\"2.06\",\"localVisitor\":\"1.15\",\"equalVisitor\":\"1.05\",\"t1tLocal\":\"5.00\",\"t1tEqual\":\"2.10\",\"t1tVisitor\":\"2.10\",\"t1tLocal2tLocal\":\"10.00\",\"t1tEqual2tLocal\":\"11.00\",\"t1tVisitor2tLocal\":\"39.00\",\"t1tLocal2tEqual\":\"14.50\",\"t1tEqual2tEqual\":\"5.60\",\"t1tVisitor2tEqual\":\"16.50\",\"t1tLocal2tVisitor\":\"24.00\",\"t1tEqual2tVisitor\":\"3.80\",\"t1tVisitor2tVisitor\":\"2.30\",\"goalLower2\":\"1.70\",\"goalOver3\":\"1.80\",\"goal_0_1\":\"3.00\",\"goal_2_3\":\"1.85\",\"goal4More\":\"2.75\"},{\"hour\":\"13:45\",\"eventId\":516,\"leagueId\":\"ING\",\"minimun\":3,\"teams\":\"Middlesbrough - Wolves\",\"exactGoal\":\"-\",\"local\":\"1.80\",\"equal\":\"3.20\",\"visitor\":\"3.50\",\"localEqual\":\"1.15\",\"localVisitor\":\"1.19\",\"equalVisitor\":\"1.67\",\"t1tLocal\":\"2.65\",\"t1tEqual\":\"1.90\",\"t1tVisitor\":\"4.40\",\"t1tLocal2tLocal\":\"3.00\",\"t1tEqual2tLocal\":\"4.20\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"15.50\",\"t1tEqual2tEqual\":\"4.60\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"29.00\",\"t1tEqual2tVisitor\":\"7.00\",\"t1tVisitor2tVisitor\":\"7.00\",\"goalLower2\":\"1.60\",\"goalOver3\":\"1.90\",\"goal_0_1\":\"2.90\",\"goal_2_3\":\"1.80\",\"goal4More\":\"2.90\"},{\"hour\":\"13:45\",\"eventId\":517,\"leagueId\":\"ING\",\"minimun\":3,\"teams\":\"Millwall - Wigan\",\"exactGoal\":\"-\",\"local\":\"2.45\",\"equal\":\"3.10\",\"visitor\":\"2.35\",\"localEqual\":\"1.37\",\"localVisitor\":\"1.20\",\"equalVisitor\":\"1.34\",\"t1tLocal\":\"3.20\",\"t1tEqual\":\"2.00\",\"t1tVisitor\":\"3.10\",\"t1tLocal2tLocal\":\"4.50\",\"t1tEqual2tLocal\":\"5.75\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"13.50\",\"t1tEqual2tEqual\":\"4.60\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"5.25\",\"t1tVisitor2tVisitor\":\"4.30\",\"goalLower2\":\"1.60\",\"goalOver3\":\"1.90\",\"goal_0_1\":\"2.75\",\"goal_2_3\":\"1.80\",\"goal4More\":\"3.15\"},{\"hour\":\"13:45\",\"eventId\":518,\"leagueId\":\"ING\",\"minimun\":3,\"teams\":\"Sheffield Wed - Brentford\",\"exactGoal\":\"-\",\"local\":\"2.70\",\"equal\":\"3.10\",\"visitor\":\"2.15\",\"localEqual\":\"1.44\",\"localVisitor\":\"1.20\",\"equalVisitor\":\"1.27\",\"t1tLocal\":\"3.40\",\"t1tEqual\":\"2.00\",\"t1tVisitor\":\"2.80\",\"t1tLocal2tLocal\":\"4.75\",\"t1tEqual2tLocal\":\"6.00\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"13.50\",\"t1tEqual2tEqual\":\"4.60\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"5.00\",\"t1tVisitor2tVisitor\":\"3.90\",\"goalLower2\":\"1.65\",\"goalOver3\":\"1.85\",\"goal_0_1\":\"2.85\",\"goal_2_3\":\"1.80\",\"goal4More\":\"3.00\"},{\"hour\":\"13:45\",\"eventId\":519,\"leagueId\":\"IN1\",\"minimun\":3,\"teams\":\"Bradford - Bristol City\",\"exactGoal\":\"-\",\"local\":\"2.80\",\"equal\":\"3.10\",\"visitor\":\"2.10\",\"localEqual\":\"1.47\",\"localVisitor\":\"1.20\",\"equalVisitor\":\"1.25\",\"t1tLocal\":\"3.50\",\"t1tEqual\":\"2.00\",\"t1tVisitor\":\"2.75\",\"t1tLocal2tLocal\":\"5.00\",\"t1tEqual2tLocal\":\"6.00\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"13.50\",\"t1tEqual2tEqual\":\"4.60\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"5.00\",\"t1tVisitor2tVisitor\":\"3.60\",\"goalLower2\":\"1.65\",\"goalOver3\":\"1.85\",\"goal_0_1\":\"2.90\",\"goal_2_3\":\"1.80\",\"goal4More\":\"2.90\"},{\"hour\":\"13:45\",\"eventId\":520,\"leagueId\":\"IN1\",\"minimun\":3,\"teams\":\"Chesterfield - Colchester\",\"exactGoal\":\"-\",\"local\":\"1.55\",\"equal\":\"3.40\",\"visitor\":\"4.75\",\"localEqual\":\"1.06\",\"localVisitor\":\"1.17\",\"equalVisitor\":\"1.98\",\"t1tLocal\":\"2.10\",\"t1tEqual\":\"2.15\",\"t1tVisitor\":\"5.00\",\"t1tLocal2tLocal\":\"2.35\",\"t1tEqual2tLocal\":\"4.20\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"14.50\",\"t1tEqual2tEqual\":\"5.50\",\"t1tVisitor2tEqual\":\"13.50\",\"t1tLocal2tVisitor\":\"40.00\",\"t1tEqual2tVisitor\":\"11.00\",\"t1tVisitor2tVisitor\":\"9.00\",\"goalLower2\":\"1.75\",\"goalOver3\":\"1.75\",\"goal_0_1\":\"3.30\",\"goal_2_3\":\"1.85\",\"goal4More\":\"2.55\"},{\"hour\":\"13:45\",\"eventId\":521,\"leagueId\":\"IN1\",\"minimun\":3,\"teams\":\"Coventry - Oldham\",\"exactGoal\":\"-\",\"local\":\"2.05\",\"equal\":\"3.10\",\"visitor\":\"2.90\",\"localEqual\":\"1.23\",\"localVisitor\":\"1.20\",\"equalVisitor\":\"1.50\",\"t1tLocal\":\"2.90\",\"t1tEqual\":\"1.90\",\"t1tVisitor\":\"3.80\",\"t1tLocal2tLocal\":\"3.90\",\"t1tEqual2tLocal\":\"4.60\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"15.50\",\"t1tEqual2tEqual\":\"4.50\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"6.00\",\"t1tVisitor2tVisitor\":\"5.60\",\"goalLower2\":\"1.60\",\"goalOver3\":\"1.90\",\"goal_0_1\":\"2.75\",\"goal_2_3\":\"1.80\",\"goal4More\":\"3.15\"},{\"hour\":\"13:45\",\"eventId\":522,\"leagueId\":\"IN1\",\"minimun\":3,\"teams\":\"Fleetwood Town - Mk Dons\",\"exactGoal\":\"-\",\"local\":\"3.60\",\"equal\":\"3.20\",\"visitor\":\"1.75\",\"localEqual\":\"1.69\",\"localVisitor\":\"1.18\",\"equalVisitor\":\"1.13\",\"t1tLocal\":\"4.20\",\"t1tEqual\":\"2.05\",\"t1tVisitor\":\"2.35\",\"t1tLocal2tLocal\":\"6.75\",\"t1tEqual2tLocal\":\"7.75\",\"t1tVisitor2tLocal\":\"29.00\",\"t1tLocal2tEqual\":\"13.50\",\"t1tEqual2tEqual\":\"4.75\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"4.50\",\"t1tVisitor2tVisitor\":\"2.75\",\"goalLower2\":\"1.75\",\"goalOver3\":\"1.75\",\"goal_0_1\":\"3.10\",\"goal_2_3\":\"1.80\",\"goal4More\":\"2.80\"},{\"hour\":\"13:45\",\"eventId\":523,\"leagueId\":\"IN1\",\"minimun\":3,\"teams\":\"Leyton Orient - Doncaster\",\"exactGoal\":\"-\",\"local\":\"1.90\",\"equal\":\"3.10\",\"visitor\":\"3.20\",\"localEqual\":\"1.18\",\"localVisitor\":\"1.19\",\"equalVisitor\":\"1.57\",\"t1tLocal\":\"2.55\",\"t1tEqual\":\"2.00\",\"t1tVisitor\":\"3.90\",\"t1tLocal2tLocal\":\"3.20\",\"t1tEqual2tLocal\":\"4.60\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"14.50\",\"t1tEqual2tEqual\":\"4.60\",\"t1tVisitor2tEqual\":\"13.50\",\"t1tLocal2tVisitor\":\"29.00\",\"t1tEqual2tVisitor\":\"6.75\",\"t1tVisitor2tVisitor\":\"6.00\",\"goalLower2\":\"1.70\",\"goalOver3\":\"1.80\",\"goal_0_1\":\"3.00\",\"goal_2_3\":\"1.80\",\"goal4More\":\"2.85\"},{\"hour\":\"13:45\",\"eventId\":524,\"leagueId\":\"IN1\",\"minimun\":3,\"teams\":\"Notts County - Barnsley\",\"exactGoal\":\"-\",\"local\":\"2.35\",\"equal\":\"3.10\",\"visitor\":\"2.45\",\"localEqual\":\"1.34\",\"localVisitor\":\"1.20\",\"equalVisitor\":\"1.37\",\"t1tLocal\":\"3.15\",\"t1tEqual\":\"1.90\",\"t1tVisitor\":\"3.20\",\"t1tLocal2tLocal\":\"4.50\",\"t1tEqual2tLocal\":\"5.10\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"15.50\",\"t1tEqual2tEqual\":\"4.50\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"5.60\",\"t1tVisitor2tVisitor\":\"4.60\",\"goalLower2\":\"1.55\",\"goalOver3\":\"1.95\",\"goal_0_1\":\"2.45\",\"goal_2_3\":\"1.80\",\"goal4More\":\"3.65\"},{\"hour\":\"13:45\",\"eventId\":525,\"leagueId\":\"IN1\",\"minimun\":3,\"teams\":\"Peterborough - Crewe\",\"exactGoal\":\"-\",\"local\":\"1.50\",\"equal\":\"3.50\",\"visitor\":\"5.00\",\"localEqual\":\"1.05\",\"localVisitor\":\"1.15\",\"equalVisitor\":\"2.06\",\"t1tLocal\":\"2.00\",\"t1tEqual\":\"2.30\",\"t1tVisitor\":\"5.25\",\"t1tLocal2tLocal\":\"2.25\",\"t1tEqual2tLocal\":\"4.10\",\"t1tVisitor2tLocal\":\"24.00\",\"t1tLocal2tEqual\":\"15.50\",\"t1tEqual2tEqual\":\"6.00\",\"t1tVisitor2tEqual\":\"13.50\",\"t1tLocal2tVisitor\":\"40.00\",\"t1tEqual2tVisitor\":\"11.00\",\"t1tVisitor2tVisitor\":\"10.00\",\"goalLower2\":\"1.80\",\"goalOver3\":\"1.70\",\"goal_0_1\":\"3.40\",\"goal_2_3\":\"1.85\",\"goal4More\":\"2.50\"},{\"hour\":\"13:45\",\"eventId\":526,\"leagueId\":\"IN1\",\"minimun\":3,\"teams\":\"Preston - Gillingham\",\"exactGoal\":\"-\",\"local\":\"1.30\",\"equal\":\"4.25\",\"visitor\":\"7.00\",\"localEqual\":\"-\",\"localVisitor\":\"1.10\",\"equalVisitor\":\"2.64\",\"t1tLocal\":\"1.70\",\"t1tEqual\":\"2.45\",\"t1tVisitor\":\"6.00\",\"t1tLocal2tLocal\":\"1.80\",\"t1tEqual2tLocal\":\"4.00\",\"t1tVisitor2tLocal\":\"24.00\",\"t1tLocal2tEqual\":\"23.00\",\"t1tEqual2tEqual\":\"7.00\",\"t1tVisitor2tEqual\":\"15.50\",\"t1tLocal2tVisitor\":\"60.00\",\"t1tEqual2tVisitor\":\"17.00\",\"t1tVisitor2tVisitor\":\"15.00\",\"goalLower2\":\"1.90\",\"goalOver3\":\"1.60\",\"goal_0_1\":\"3.80\",\"goal_2_3\":\"1.85\",\"goal4More\":\"2.35\"},{\"hour\":\"13:45\",\"eventId\":527,\"leagueId\":\"IN1\",\"minimun\":3,\"teams\":\"Rochdale - Swindon\",\"exactGoal\":\"-\",\"local\":\"2.45\",\"equal\":\"3.10\",\"visitor\":\"2.35\",\"localEqual\":\"1.37\",\"localVisitor\":\"1.20\",\"equalVisitor\":\"1.34\",\"t1tLocal\":\"3.10\",\"t1tEqual\":\"2.00\",\"t1tVisitor\":\"3.00\",\"t1tLocal2tLocal\":\"4.40\",\"t1tEqual2tLocal\":\"5.75\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"12.50\",\"t1tEqual2tEqual\":\"4.90\",\"t1tVisitor2tEqual\":\"13.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"5.50\",\"t1tVisitor2tVisitor\":\"4.20\",\"goalLower2\":\"1.80\",\"goalOver3\":\"1.70\",\"goal_0_1\":\"2.90\",\"goal_2_3\":\"1.85\",\"goal4More\":\"2.80\"},{\"hour\":\"13:45\",\"eventId\":528,\"leagueId\":\"IN1\",\"minimun\":3,\"teams\":\"Scunthorpe - Port Vale\",\"exactGoal\":\"-\",\"local\":\"1.95\",\"equal\":\"3.10\",\"visitor\":\"3.10\",\"localEqual\":\"1.20\",\"localVisitor\":\"1.20\",\"equalVisitor\":\"1.55\",\"t1tLocal\":\"2.65\",\"t1tEqual\":\"2.00\",\"t1tVisitor\":\"3.90\",\"t1tLocal2tLocal\":\"3.40\",\"t1tEqual2tLocal\":\"5.00\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"14.50\",\"t1tEqual2tEqual\":\"4.60\",\"t1tVisitor2tEqual\":\"13.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"6.75\",\"t1tVisitor2tVisitor\":\"5.75\",\"goalLower2\":\"1.70\",\"goalOver3\":\"1.80\",\"goal_0_1\":\"2.90\",\"goal_2_3\":\"1.80\",\"goal4More\":\"2.90\"},{\"hour\":\"13:45\",\"eventId\":529,\"leagueId\":\"IN1\",\"minimun\":3,\"teams\":\"Walsall - Crawley\",\"exactGoal\":\"-\",\"local\":\"1.60\",\"equal\":\"3.30\",\"visitor\":\"4.50\",\"localEqual\":\"1.08\",\"localVisitor\":\"1.18\",\"equalVisitor\":\"1.90\",\"t1tLocal\":\"2.25\",\"t1tEqual\":\"1.95\",\"t1tVisitor\":\"4.60\",\"t1tLocal2tLocal\":\"2.55\",\"t1tEqual2tLocal\":\"3.90\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"15.50\",\"t1tEqual2tEqual\":\"5.10\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"34.00\",\"t1tEqual2tVisitor\":\"10.00\",\"t1tVisitor2tVisitor\":\"9.00\",\"goalLower2\":\"1.55\",\"goalOver3\":\"1.95\",\"goal_0_1\":\"2.60\",\"goal_2_3\":\"1.75\",\"goal4More\":\"3.65\"},{\"hour\":\"13:45\",\"eventId\":530,\"leagueId\":\"IN1\",\"minimun\":3,\"teams\":\"Yeovil - Sheffield Utd.\",\"exactGoal\":\"-\",\"local\":\"3.75\",\"equal\":\"3.30\",\"visitor\":\"1.70\",\"localEqual\":\"1.76\",\"localVisitor\":\"1.17\",\"equalVisitor\":\"1.12\",\"t1tLocal\":\"4.50\",\"t1tEqual\":\"1.95\",\"t1tVisitor\":\"2.40\",\"t1tLocal2tLocal\":\"7.25\",\"t1tEqual2tLocal\":\"8.25\",\"t1tVisitor2tLocal\":\"34.00\",\"t1tLocal2tEqual\":\"14.50\",\"t1tEqual2tEqual\":\"5.10\",\"t1tVisitor2tEqual\":\"15.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"4.20\",\"t1tVisitor2tVisitor\":\"2.80\",\"goalLower2\":\"1.65\",\"goalOver3\":\"1.85\",\"goal_0_1\":\"2.90\",\"goal_2_3\":\"1.80\",\"goal4More\":\"2.90\"},{\"hour\":\"13:45\",\"eventId\":531,\"leagueId\":\"IN2\",\"minimun\":3,\"teams\":\"Bury - Shrewsbury\",\"exactGoal\":\"-\",\"local\":\"2.35\",\"equal\":\"3.10\",\"visitor\":\"2.45\",\"localEqual\":\"1.34\",\"localVisitor\":\"1.20\",\"equalVisitor\":\"1.37\",\"t1tLocal\":\"3.15\",\"t1tEqual\":\"1.90\",\"t1tVisitor\":\"3.20\",\"t1tLocal2tLocal\":\"4.50\",\"t1tEqual2tLocal\":\"5.10\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"15.50\",\"t1tEqual2tEqual\":\"4.50\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"5.60\",\"t1tVisitor2tVisitor\":\"4.60\",\"goalLower2\":\"1.50\",\"goalOver3\":\"2.00\",\"goal_0_1\":\"2.45\",\"goal_2_3\":\"1.80\",\"goal4More\":\"3.65\"},{\"hour\":\"13:45\",\"eventId\":532,\"leagueId\":\"IN2\",\"minimun\":3,\"teams\":\"Cheltenham - Cambridge\",\"exactGoal\":\"-\",\"local\":\"2.40\",\"equal\":\"3.10\",\"visitor\":\"2.40\",\"localEqual\":\"1.35\",\"localVisitor\":\"1.20\",\"equalVisitor\":\"1.35\",\"t1tLocal\":\"3.10\",\"t1tEqual\":\"2.00\",\"t1tVisitor\":\"3.10\",\"t1tLocal2tLocal\":\"4.30\",\"t1tEqual2tLocal\":\"5.25\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"14.50\",\"t1tEqual2tEqual\":\"4.60\",\"t1tVisitor2tEqual\":\"13.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"5.25\",\"t1tVisitor2tVisitor\":\"4.30\",\"goalLower2\":\"1.60\",\"goalOver3\":\"1.90\",\"goal_0_1\":\"2.75\",\"goal_2_3\":\"1.80\",\"goal4More\":\"3.15\"},{\"hour\":\"13:45\",\"eventId\":533,\"leagueId\":\"IN2\",\"minimun\":3,\"teams\":\"Dagenham & Red - Luton\",\"exactGoal\":\"-\",\"local\":\"2.70\",\"equal\":\"3.10\",\"visitor\":\"2.15\",\"localEqual\":\"1.44\",\"localVisitor\":\"1.20\",\"equalVisitor\":\"1.27\",\"t1tLocal\":\"3.40\",\"t1tEqual\":\"1.90\",\"t1tVisitor\":\"3.00\",\"t1tLocal2tLocal\":\"5.10\",\"t1tEqual2tLocal\":\"6.00\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"14.50\",\"t1tEqual2tEqual\":\"4.50\",\"t1tVisitor2tEqual\":\"15.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"4.90\",\"t1tVisitor2tVisitor\":\"4.10\",\"goalLower2\":\"1.55\",\"goalOver3\":\"1.95\",\"goal_0_1\":\"2.70\",\"goal_2_3\":\"1.80\",\"goal4More\":\"3.20\"},{\"hour\":\"13:45\",\"eventId\":534,\"leagueId\":\"IN2\",\"minimun\":3,\"teams\":\"Hartlepool - Accrington\",\"exactGoal\":\"-\",\"local\":\"2.15\",\"equal\":\"3.10\",\"visitor\":\"2.70\",\"localEqual\":\"1.27\",\"localVisitor\":\"1.20\",\"equalVisitor\":\"1.44\",\"t1tLocal\":\"3.00\",\"t1tEqual\":\"1.90\",\"t1tVisitor\":\"3.40\",\"t1tLocal2tLocal\":\"4.10\",\"t1tEqual2tLocal\":\"4.90\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"15.50\",\"t1tEqual2tEqual\":\"4.50\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"6.00\",\"t1tVisitor2tVisitor\":\"5.10\",\"goalLower2\":\"1.55\",\"goalOver3\":\"1.95\",\"goal_0_1\":\"2.70\",\"goal_2_3\":\"1.80\",\"goal4More\":\"3.20\"},{\"hour\":\"13:45\",\"eventId\":535,\"leagueId\":\"IN2\",\"minimun\":3,\"teams\":\"Mansfield - Tranmere\",\"exactGoal\":\"-\",\"local\":\"2.25\",\"equal\":\"3.10\",\"visitor\":\"2.55\",\"localEqual\":\"1.30\",\"localVisitor\":\"1.20\",\"equalVisitor\":\"1.40\",\"t1tLocal\":\"3.10\",\"t1tEqual\":\"1.90\",\"t1tVisitor\":\"3.30\",\"t1tLocal2tLocal\":\"4.30\",\"t1tEqual2tLocal\":\"5.10\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"15.50\",\"t1tEqual2tEqual\":\"4.50\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"5.60\",\"t1tVisitor2tVisitor\":\"4.90\",\"goalLower2\":\"1.50\",\"goalOver3\":\"2.00\",\"goal_0_1\":\"2.60\",\"goal_2_3\":\"1.80\",\"goal4More\":\"3.40\"},{\"hour\":\"13:45\",\"eventId\":536,\"leagueId\":\"IN2\",\"minimun\":3,\"teams\":\"Oxford - Northampton\",\"exactGoal\":\"-\",\"local\":\"2.35\",\"equal\":\"3.10\",\"visitor\":\"2.45\",\"localEqual\":\"1.34\",\"localVisitor\":\"1.20\",\"equalVisitor\":\"1.37\",\"t1tLocal\":\"3.15\",\"t1tEqual\":\"1.90\",\"t1tVisitor\":\"3.20\",\"t1tLocal2tLocal\":\"4.50\",\"t1tEqual2tLocal\":\"5.10\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"15.50\",\"t1tEqual2tEqual\":\"4.50\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"5.60\",\"t1tVisitor2tVisitor\":\"4.60\",\"goalLower2\":\"1.55\",\"goalOver3\":\"1.95\",\"goal_0_1\":\"2.45\",\"goal_2_3\":\"1.80\",\"goal4More\":\"3.65\"},{\"hour\":\"13:45\",\"eventId\":537,\"leagueId\":\"IN2\",\"minimun\":3,\"teams\":\"Plymouth - Afc Wimbledon\",\"exactGoal\":\"-\",\"local\":\"1.60\",\"equal\":\"3.30\",\"visitor\":\"4.50\",\"localEqual\":\"1.08\",\"localVisitor\":\"1.18\",\"equalVisitor\":\"1.90\",\"t1tLocal\":\"2.25\",\"t1tEqual\":\"1.95\",\"t1tVisitor\":\"4.60\",\"t1tLocal2tLocal\":\"2.55\",\"t1tEqual2tLocal\":\"3.90\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"15.50\",\"t1tEqual2tEqual\":\"5.10\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"34.00\",\"t1tEqual2tVisitor\":\"10.00\",\"t1tVisitor2tVisitor\":\"9.00\",\"goalLower2\":\"1.55\",\"goalOver3\":\"1.95\",\"goal_0_1\":\"2.60\",\"goal_2_3\":\"1.75\",\"goal4More\":\"3.65\"},{\"hour\":\"13:45\",\"eventId\":538,\"leagueId\":\"IN2\",\"minimun\":3,\"teams\":\"Southend - Newport County\",\"exactGoal\":\"-\",\"local\":\"1.70\",\"equal\":\"3.30\",\"visitor\":\"3.75\",\"localEqual\":\"1.12\",\"localVisitor\":\"1.17\",\"equalVisitor\":\"1.76\",\"t1tLocal\":\"2.40\",\"t1tEqual\":\"1.95\",\"t1tVisitor\":\"4.50\",\"t1tLocal2tLocal\":\"2.80\",\"t1tEqual2tLocal\":\"4.20\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"15.50\",\"t1tEqual2tEqual\":\"5.10\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"34.00\",\"t1tEqual2tVisitor\":\"8.25\",\"t1tVisitor2tVisitor\":\"7.25\",\"goalLower2\":\"1.55\",\"goalOver3\":\"1.95\",\"goal_0_1\":\"2.45\",\"goal_2_3\":\"1.75\",\"goal4More\":\"3.90\"},{\"hour\":\"13:45\",\"eventId\":539,\"leagueId\":\"IN2\",\"minimun\":3,\"teams\":\"Stevenage - Portsmouth\",\"exactGoal\":\"-\",\"local\":\"2.15\",\"equal\":\"3.10\",\"visitor\":\"2.70\",\"localEqual\":\"1.27\",\"localVisitor\":\"1.20\",\"equalVisitor\":\"1.44\",\"t1tLocal\":\"3.00\",\"t1tEqual\":\"1.90\",\"t1tVisitor\":\"3.40\",\"t1tLocal2tLocal\":\"4.10\",\"t1tEqual2tLocal\":\"4.90\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"15.50\",\"t1tEqual2tEqual\":\"4.50\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"6.00\",\"t1tVisitor2tVisitor\":\"5.10\",\"goalLower2\":\"1.55\",\"goalOver3\":\"1.95\",\"goal_0_1\":\"2.70\",\"goal_2_3\":\"1.80\",\"goal4More\":\"3.20\"},{\"hour\":\"13:45\",\"eventId\":540,\"leagueId\":\"IN2\",\"minimun\":3,\"teams\":\"Wycombe - Exeter\",\"exactGoal\":\"-\",\"local\":\"1.70\",\"equal\":\"3.30\",\"visitor\":\"3.75\",\"localEqual\":\"1.12\",\"localVisitor\":\"1.17\",\"equalVisitor\":\"1.76\",\"t1tLocal\":\"2.40\",\"t1tEqual\":\"1.95\",\"t1tVisitor\":\"4.50\",\"t1tLocal2tLocal\":\"2.80\",\"t1tEqual2tLocal\":\"4.20\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"15.50\",\"t1tEqual2tEqual\":\"5.10\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"34.00\",\"t1tEqual2tVisitor\":\"8.25\",\"t1tVisitor2tVisitor\":\"7.25\",\"goalLower2\":\"1.55\",\"goalOver3\":\"1.95\",\"goal_0_1\":\"2.45\",\"goal_2_3\":\"1.75\",\"goal4More\":\"3.90\"},{\"hour\":\"13:45\",\"eventId\":541,\"leagueId\":\"IN2\",\"minimun\":3,\"teams\":\"York - Morecambe\",\"exactGoal\":\"-\",\"local\":\"1.95\",\"equal\":\"3.10\",\"visitor\":\"3.10\",\"localEqual\":\"1.20\",\"localVisitor\":\"1.20\",\"equalVisitor\":\"1.55\",\"t1tLocal\":\"2.80\",\"t1tEqual\":\"1.90\",\"t1tVisitor\":\"3.90\",\"t1tLocal2tLocal\":\"3.40\",\"t1tEqual2tLocal\":\"4.90\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"15.50\",\"t1tEqual2tEqual\":\"4.50\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"6.50\",\"t1tVisitor2tVisitor\":\"6.00\",\"goalLower2\":\"1.50\",\"goalOver3\":\"2.00\",\"goal_0_1\":\"2.35\",\"goal_2_3\":\"1.75\",\"goal4More\":\"4.20\"},{\"hour\":\"14:00\",\"eventId\":542,\"leagueId\":\"ING\",\"minimun\":3,\"teams\":\"Bolton - Charlton\",\"exactGoal\":\"-\",\"local\":\"1.95\",\"equal\":\"3.10\",\"visitor\":\"3.10\",\"localEqual\":\"1.20\",\"localVisitor\":\"1.20\",\"equalVisitor\":\"1.55\",\"t1tLocal\":\"2.65\",\"t1tEqual\":\"2.00\",\"t1tVisitor\":\"3.90\",\"t1tLocal2tLocal\":\"3.40\",\"t1tEqual2tLocal\":\"5.00\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"14.50\",\"t1tEqual2tEqual\":\"4.60\",\"t1tVisitor2tEqual\":\"13.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"6.75\",\"t1tVisitor2tVisitor\":\"5.75\",\"goalLower2\":\"1.65\",\"goalOver3\":\"1.85\",\"goal_0_1\":\"2.90\",\"goal_2_3\":\"1.80\",\"goal4More\":\"2.90\"},{\"hour\":\"14:00\",\"eventId\":543,\"leagueId\":\"ING\",\"minimun\":3,\"teams\":\"Reading - Bournemouth\",\"exactGoal\":\"-\",\"local\":\"5.50\",\"equal\":\"3.60\",\"visitor\":\"1.45\",\"localEqual\":\"2.18\",\"localVisitor\":\"1.15\",\"equalVisitor\":\"-\",\"t1tLocal\":\"5.50\",\"t1tEqual\":\"2.35\",\"t1tVisitor\":\"1.90\",\"t1tLocal2tLocal\":\"11.00\",\"t1tEqual2tLocal\":\"13.00\",\"t1tVisitor2tLocal\":\"40.00\",\"t1tLocal2tEqual\":\"14.50\",\"t1tEqual2tEqual\":\"6.00\",\"t1tVisitor2tEqual\":\"18.00\",\"t1tLocal2tVisitor\":\"24.00\",\"t1tEqual2tVisitor\":\"4.10\",\"t1tVisitor2tVisitor\":\"2.15\",\"goalLower2\":\"1.85\",\"goalOver3\":\"1.65\",\"goal_0_1\":\"3.50\",\"goal_2_3\":\"1.85\",\"goal4More\":\"2.45\"},{\"hour\":\"17:00\",\"eventId\":544,\"leagueId\":\"CLA\",\"minimun\":3,\"teams\":\"Huracan - Cruzeiro\",\"exactGoal\":\"-\",\"local\":\"2.45\",\"equal\":\"3.10\",\"visitor\":\"2.35\",\"localEqual\":\"1.37\",\"localVisitor\":\"1.20\",\"equalVisitor\":\"1.34\",\"t1tLocal\":\"3.20\",\"t1tEqual\":\"2.00\",\"t1tVisitor\":\"3.10\",\"t1tLocal2tLocal\":\"4.50\",\"t1tEqual2tLocal\":\"5.75\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"13.50\",\"t1tEqual2tEqual\":\"4.60\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"5.25\",\"t1tVisitor2tVisitor\":\"4.30\",\"goalLower2\":\"1.60\",\"goalOver3\":\"1.90\",\"goal_0_1\":\"2.75\",\"goal_2_3\":\"1.80\",\"goal4More\":\"3.15\"},{\"hour\":\"17:00\",\"eventId\":545,\"leagueId\":\"CLA\",\"minimun\":3,\"teams\":\"Univ. De Sucre - Mineros Guayana\",\"exactGoal\":\"-\",\"local\":\"1.35\",\"equal\":\"4.00\",\"visitor\":\"6.25\",\"localEqual\":\"-\",\"localVisitor\":\"1.11\",\"equalVisitor\":\"2.44\",\"t1tLocal\":\"1.90\",\"t1tEqual\":\"2.35\",\"t1tVisitor\":\"6.25\",\"t1tLocal2tLocal\":\"1.95\",\"t1tEqual2tLocal\":\"3.80\",\"t1tVisitor2tLocal\":\"24.00\",\"t1tLocal2tEqual\":\"22.00\",\"t1tEqual2tEqual\":\"6.25\",\"t1tVisitor2tEqual\":\"15.50\",\"t1tLocal2tVisitor\":\"50.00\",\"t1tEqual2tVisitor\":\"15.50\",\"t1tVisitor2tVisitor\":\"13.50\",\"goalLower2\":\"1.70\",\"goalOver3\":\"1.80\",\"goal_0_1\":\"3.20\",\"goal_2_3\":\"1.85\",\"goal4More\":\"2.65\"},{\"hour\":\"19:15\",\"eventId\":546,\"leagueId\":\"CLA\",\"minimun\":2,\"teams\":\"Racing Club - Depor Tachira\",\"exactGoal\":\"-\",\"local\":\"1.10\",\"equal\":\"6.25\",\"visitor\":\"12.50\",\"localEqual\":\"-\",\"localVisitor\":\"-\",\"equalVisitor\":\"4.17\",\"t1tLocal\":\"1.35\",\"t1tEqual\":\"3.10\",\"t1tVisitor\":\"12.00\",\"t1tLocal2tLocal\":\"1.40\",\"t1tEqual2tLocal\":\"4.40\",\"t1tVisitor2tLocal\":\"29.00\",\"t1tLocal2tEqual\":\"40.00\",\"t1tEqual2tEqual\":\"11.50\",\"t1tVisitor2tEqual\":\"21.00\",\"t1tLocal2tVisitor\":\"75.00\",\"t1tEqual2tVisitor\":\"37.00\",\"t1tVisitor2tVisitor\":\"34.00\",\"goalLower2\":\"2.10\",\"goalOver3\":\"1.45\",\"goal_0_1\":\"4.60\",\"goal_2_3\":\"1.95\",\"goal4More\":\"2.00\"},{\"hour\":\"19:15\",\"eventId\":547,\"leagueId\":\"CLA\",\"minimun\":2,\"teams\":\"Sporting Cristal - Guarani Asuncion\",\"exactGoal\":\"exact-goal\",\"local\":\"1.95\",\"equal\":\"3.10\",\"visitor\":\"3.10\",\"localEqual\":\"1.20\",\"localVisitor\":\"1.20\",\"equalVisitor\":\"1.55\",\"t1tLocal\":\"2.80\",\"t1tEqual\":\"1.90\",\"t1tVisitor\":\"3.90\",\"t1tLocal2tLocal\":\"3.40\",\"t1tEqual2tLocal\":\"4.90\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"15.50\",\"t1tEqual2tEqual\":\"4.50\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"6.50\",\"t1tVisitor2tVisitor\":\"6.00\",\"goalLower2\":\"1.60\",\"goalOver3\":\"1.90\",\"goal_0_1\":\"2.80\",\"goal_2_3\":\"1.80\",\"goal4More\":\"3.10\"}]},{\"drawId\":1532,\"date\":\"Miércoles 15 de abril de 2015\",\"events\":[{\"hour\":\"11:30\",\"eventId\":560,\"leagueId\":\"AU1\",\"minimun\":3,\"teams\":\"Altach - Wiener Neustadt\",\"exactGoal\":\"-\",\"local\":\"1.55\",\"equal\":\"3.40\",\"visitor\":\"4.75\",\"localEqual\":\"1.06\",\"localVisitor\":\"1.17\",\"equalVisitor\":\"1.98\",\"t1tLocal\":\"2.10\",\"t1tEqual\":\"2.15\",\"t1tVisitor\":\"5.00\",\"t1tLocal2tLocal\":\"2.35\",\"t1tEqual2tLocal\":\"4.20\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"14.50\",\"t1tEqual2tEqual\":\"5.50\",\"t1tVisitor2tEqual\":\"13.50\",\"t1tLocal2tVisitor\":\"40.00\",\"t1tEqual2tVisitor\":\"11.00\",\"t1tVisitor2tVisitor\":\"9.00\",\"goalLower2\":\"1.90\",\"goalOver3\":\"1.60\",\"goal_0_1\":\"3.50\",\"goal_2_3\":\"1.85\",\"goal4More\":\"2.45\"},{\"hour\":\"11:30\",\"eventId\":561,\"leagueId\":\"FR1\",\"minimun\":3,\"teams\":\"Lyon - Bastia\",\"exactGoal\":\"-\",\"local\":\"1.20\",\"equal\":\"5.00\",\"visitor\":\"8.50\",\"localEqual\":\"-\",\"localVisitor\":\"1.05\",\"equalVisitor\":\"3.15\",\"t1tLocal\":\"1.60\",\"t1tEqual\":\"2.65\",\"t1tVisitor\":\"8.50\",\"t1tLocal2tLocal\":\"1.65\",\"t1tEqual2tLocal\":\"4.00\",\"t1tVisitor2tLocal\":\"24.00\",\"t1tLocal2tEqual\":\"27.00\",\"t1tEqual2tEqual\":\"8.25\",\"t1tVisitor2tEqual\":\"20.00\",\"t1tLocal2tVisitor\":\"60.00\",\"t1tEqual2tVisitor\":\"22.00\",\"t1tVisitor2tVisitor\":\"20.00\",\"goalLower2\":\"1.80\",\"goalOver3\":\"1.70\",\"goal_0_1\":\"3.30\",\"goal_2_3\":\"1.80\",\"goal4More\":\"2.65\"},{\"hour\":\"11:30\",\"eventId\":562,\"leagueId\":\"IT1\",\"minimun\":3,\"teams\":\"Genova - Parma\",\"exactGoal\":\"-\",\"local\":\"1.55\",\"equal\":\"3.40\",\"visitor\":\"4.75\",\"localEqual\":\"1.06\",\"localVisitor\":\"1.17\",\"equalVisitor\":\"1.98\",\"t1tLocal\":\"2.20\",\"t1tEqual\":\"2.05\",\"t1tVisitor\":\"5.00\",\"t1tLocal2tLocal\":\"2.45\",\"t1tEqual2tLocal\":\"3.90\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"15.50\",\"t1tEqual2tEqual\":\"5.30\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"39.00\",\"t1tEqual2tVisitor\":\"11.00\",\"t1tVisitor2tVisitor\":\"9.00\",\"goalLower2\":\"1.65\",\"goalOver3\":\"1.85\",\"goal_0_1\":\"3.00\",\"goal_2_3\":\"1.85\",\"goal4More\":\"2.75\"},{\"hour\":\"12:20\",\"eventId\":563,\"leagueId\":\"SU2\",\"minimun\":3,\"teams\":\"Ljungskile - Brommapojkarna\",\"exactGoal\":\"-\",\"local\":\"1.40\",\"equal\":\"3.75\",\"visitor\":\"6.00\",\"localEqual\":\"-\",\"localVisitor\":\"1.14\",\"equalVisitor\":\"2.31\",\"t1tLocal\":\"1.95\",\"t1tEqual\":\"2.30\",\"t1tVisitor\":\"5.75\",\"t1tLocal2tLocal\":\"2.05\",\"t1tEqual2tLocal\":\"3.80\",\"t1tVisitor2tLocal\":\"24.00\",\"t1tLocal2tEqual\":\"20.00\",\"t1tEqual2tEqual\":\"6.00\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"50.00\",\"t1tEqual2tVisitor\":\"15.00\",\"t1tVisitor2tVisitor\":\"12.50\",\"goalLower2\":\"1.70\",\"goalOver3\":\"1.80\",\"goal_0_1\":\"3.20\",\"goal_2_3\":\"1.85\",\"goal4More\":\"2.65\"},{\"hour\":\"13:45\",\"eventId\":550,\"leagueId\":\"CEU\",\"minimun\":1,\"teams\":\"Paris St. Germain - Barcelona\",\"exactGoal\":\"exact-goal\",\"local\":\"3.60\",\"equal\":\"3.20\",\"visitor\":\"1.75\",\"localEqual\":\"1.69\",\"localVisitor\":\"1.18\",\"equalVisitor\":\"1.13\",\"t1tLocal\":\"4.20\",\"t1tEqual\":\"2.05\",\"t1tVisitor\":\"2.35\",\"t1tLocal2tLocal\":\"6.75\",\"t1tEqual2tLocal\":\"7.75\",\"t1tVisitor2tLocal\":\"29.00\",\"t1tLocal2tEqual\":\"13.50\",\"t1tEqual2tEqual\":\"4.75\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"4.50\",\"t1tVisitor2tVisitor\":\"2.75\",\"goalLower2\":\"1.80\",\"goalOver3\":\"1.70\",\"goal_0_1\":\"3.30\",\"goal_2_3\":\"1.85\",\"goal4More\":\"2.55\"},{\"hour\":\"13:45\",\"eventId\":551,\"leagueId\":\"CEU\",\"minimun\":2,\"teams\":\"Porto - Bayern\",\"exactGoal\":\"exact-goal\",\"local\":\"4.75\",\"equal\":\"3.40\",\"visitor\":\"1.55\",\"localEqual\":\"1.98\",\"localVisitor\":\"1.17\",\"equalVisitor\":\"1.06\",\"t1tLocal\":\"5.00\",\"t1tEqual\":\"2.05\",\"t1tVisitor\":\"2.20\",\"t1tLocal2tLocal\":\"9.00\",\"t1tEqual2tLocal\":\"11.00\",\"t1tVisitor2tLocal\":\"39.00\",\"t1tLocal2tEqual\":\"14.50\",\"t1tEqual2tEqual\":\"5.30\",\"t1tVisitor2tEqual\":\"15.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"3.90\",\"t1tVisitor2tVisitor\":\"2.45\",\"goalLower2\":\"1.70\",\"goalOver3\":\"1.80\",\"goal_0_1\":\"3.00\",\"goal_2_3\":\"1.85\",\"goal4More\":\"2.75\"},{\"hour\":\"13:45\",\"eventId\":564,\"leagueId\":\"ING\",\"minimun\":3,\"teams\":\"Nottingham F. - Watford\",\"exactGoal\":\"-\",\"local\":\"2.80\",\"equal\":\"3.10\",\"visitor\":\"2.10\",\"localEqual\":\"1.47\",\"localVisitor\":\"1.20\",\"equalVisitor\":\"1.25\",\"t1tLocal\":\"3.30\",\"t1tEqual\":\"2.00\",\"t1tVisitor\":\"2.85\",\"t1tLocal2tLocal\":\"4.60\",\"t1tEqual2tLocal\":\"6.50\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"12.50\",\"t1tEqual2tEqual\":\"4.90\",\"t1tVisitor2tEqual\":\"13.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"5.00\",\"t1tVisitor2tVisitor\":\"3.50\",\"goalLower2\":\"1.95\",\"goalOver3\":\"1.55\",\"goal_0_1\":\"3.65\",\"goal_2_3\":\"1.85\",\"goal4More\":\"2.40\"},{\"hour\":\"13:45\",\"eventId\":565,\"leagueId\":\"IN2\",\"minimun\":3,\"teams\":\"Burton Albion - Carlisle\",\"exactGoal\":\"-\",\"local\":\"1.45\",\"equal\":\"3.60\",\"visitor\":\"5.50\",\"localEqual\":\"-\",\"localVisitor\":\"1.15\",\"equalVisitor\":\"2.18\",\"t1tLocal\":\"2.00\",\"t1tEqual\":\"2.15\",\"t1tVisitor\":\"5.60\",\"t1tLocal2tLocal\":\"2.25\",\"t1tEqual2tLocal\":\"3.80\",\"t1tVisitor2tLocal\":\"24.00\",\"t1tLocal2tEqual\":\"17.50\",\"t1tEqual2tEqual\":\"5.75\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"39.00\",\"t1tEqual2tVisitor\":\"12.50\",\"t1tVisitor2tVisitor\":\"11.00\",\"goalLower2\":\"1.65\",\"goalOver3\":\"1.85\",\"goal_0_1\":\"3.10\",\"goal_2_3\":\"1.85\",\"goal4More\":\"2.70\"},{\"hour\":\"13:45\",\"eventId\":566,\"leagueId\":\"SCP\",\"minimun\":3,\"teams\":\"Celtic - Kilmarnock\",\"exactGoal\":\"-\",\"local\":\"1.10\",\"equal\":\"6.25\",\"visitor\":\"12.50\",\"localEqual\":\"-\",\"localVisitor\":\"-\",\"equalVisitor\":\"4.17\",\"t1tLocal\":\"1.35\",\"t1tEqual\":\"3.10\",\"t1tVisitor\":\"12.00\",\"t1tLocal2tLocal\":\"1.40\",\"t1tEqual2tLocal\":\"4.40\",\"t1tVisitor2tLocal\":\"29.00\",\"t1tLocal2tEqual\":\"40.00\",\"t1tEqual2tEqual\":\"11.50\",\"t1tVisitor2tEqual\":\"21.00\",\"t1tLocal2tVisitor\":\"75.00\",\"t1tEqual2tVisitor\":\"37.00\",\"t1tVisitor2tVisitor\":\"34.00\",\"goalLower2\":\"2.10\",\"goalOver3\":\"1.45\",\"goal_0_1\":\"4.60\",\"goal_2_3\":\"1.95\",\"goal4More\":\"2.00\"},{\"hour\":\"14:00\",\"eventId\":567,\"leagueId\":\"ING\",\"minimun\":3,\"teams\":\"Fulham - Rotherham\",\"exactGoal\":\"-\",\"local\":\"1.90\",\"equal\":\"3.10\",\"visitor\":\"3.20\",\"localEqual\":\"1.18\",\"localVisitor\":\"1.19\",\"equalVisitor\":\"1.57\",\"t1tLocal\":\"2.55\",\"t1tEqual\":\"2.00\",\"t1tVisitor\":\"3.90\",\"t1tLocal2tLocal\":\"3.20\",\"t1tEqual2tLocal\":\"4.60\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"14.50\",\"t1tEqual2tEqual\":\"4.60\",\"t1tVisitor2tEqual\":\"13.50\",\"t1tLocal2tVisitor\":\"29.00\",\"t1tEqual2tVisitor\":\"6.75\",\"t1tVisitor2tVisitor\":\"6.00\",\"goalLower2\":\"1.80\",\"goalOver3\":\"1.70\",\"goal_0_1\":\"3.00\",\"goal_2_3\":\"1.80\",\"goal4More\":\"2.85\"},{\"hour\":\"15:30\",\"eventId\":568,\"leagueId\":\"CLA\",\"minimun\":3,\"teams\":\"The Strongest - Emelec\",\"exactGoal\":\"-\",\"local\":\"1.65\",\"equal\":\"3.30\",\"visitor\":\"4.00\",\"localEqual\":\"1.10\",\"localVisitor\":\"1.17\",\"equalVisitor\":\"1.81\",\"t1tLocal\":\"2.30\",\"t1tEqual\":\"1.95\",\"t1tVisitor\":\"4.50\",\"t1tLocal2tLocal\":\"2.75\",\"t1tEqual2tLocal\":\"3.90\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"15.50\",\"t1tEqual2tEqual\":\"5.10\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"34.00\",\"t1tEqual2tVisitor\":\"9.00\",\"t1tVisitor2tVisitor\":\"7.75\",\"goalLower2\":\"1.70\",\"goalOver3\":\"1.80\",\"goal_0_1\":\"3.00\",\"goal_2_3\":\"1.80\",\"goal4More\":\"2.80\"},{\"hour\":\"17:00\",\"eventId\":569,\"leagueId\":\"PAR\",\"minimun\":3,\"teams\":\"Cerro Porteno - Sportivo Luqueno\",\"exactGoal\":\"-\",\"local\":\"1.20\",\"equal\":\"5.00\",\"visitor\":\"8.50\",\"localEqual\":\"-\",\"localVisitor\":\"1.05\",\"equalVisitor\":\"3.15\",\"t1tLocal\":\"-\",\"t1tEqual\":\"-\",\"t1tVisitor\":\"-\",\"t1tLocal2tLocal\":\"-\",\"t1tEqual2tLocal\":\"-\",\"t1tVisitor2tLocal\":\"-\",\"t1tLocal2tEqual\":\"-\",\"t1tEqual2tEqual\":\"-\",\"t1tVisitor2tEqual\":\"-\",\"t1tLocal2tVisitor\":\"-\",\"t1tEqual2tVisitor\":\"-\",\"t1tVisitor2tVisitor\":\"-\",\"goalLower2\":\"-\",\"goalOver3\":\"-\",\"goal_0_1\":\"-\",\"goal_2_3\":\"-\",\"goal4More\":\"-\"},{\"hour\":\"17:00\",\"eventId\":570,\"leagueId\":\"PAR\",\"minimun\":3,\"teams\":\"San Lorenzo (Par) - Sol De America\",\"exactGoal\":\"-\",\"local\":\"3.10\",\"equal\":\"3.10\",\"visitor\":\"1.95\",\"localEqual\":\"1.55\",\"localVisitor\":\"1.20\",\"equalVisitor\":\"1.20\",\"t1tLocal\":\"-\",\"t1tEqual\":\"-\",\"t1tVisitor\":\"-\",\"t1tLocal2tLocal\":\"-\",\"t1tEqual2tLocal\":\"-\",\"t1tVisitor2tLocal\":\"-\",\"t1tLocal2tEqual\":\"-\",\"t1tEqual2tEqual\":\"-\",\"t1tVisitor2tEqual\":\"-\",\"t1tLocal2tVisitor\":\"-\",\"t1tEqual2tVisitor\":\"-\",\"t1tVisitor2tVisitor\":\"-\",\"goalLower2\":\"-\",\"goalOver3\":\"-\",\"goal_0_1\":\"-\",\"goal_2_3\":\"-\",\"goal4More\":\"-\"},{\"hour\":\"17:30\",\"eventId\":571,\"leagueId\":\"BRC\",\"minimun\":3,\"teams\":\"Joinville - Ituano\",\"exactGoal\":\"-\",\"local\":\"1.35\",\"equal\":\"4.00\",\"visitor\":\"6.25\",\"localEqual\":\"-\",\"localVisitor\":\"1.11\",\"equalVisitor\":\"2.44\",\"t1tLocal\":\"1.75\",\"t1tEqual\":\"2.45\",\"t1tVisitor\":\"5.75\",\"t1tLocal2tLocal\":\"1.90\",\"t1tEqual2tLocal\":\"4.00\",\"t1tVisitor2tLocal\":\"24.00\",\"t1tLocal2tEqual\":\"21.00\",\"t1tEqual2tEqual\":\"6.75\",\"t1tVisitor2tEqual\":\"15.50\",\"t1tLocal2tVisitor\":\"50.00\",\"t1tEqual2tVisitor\":\"16.00\",\"t1tVisitor2tVisitor\":\"14.00\",\"goalLower2\":\"1.80\",\"goalOver3\":\"1.70\",\"goal_0_1\":\"3.50\",\"goal_2_3\":\"1.85\",\"goal4More\":\"2.45\"},{\"hour\":\"17:45\",\"eventId\":572,\"leagueId\":\"CLA\",\"minimun\":3,\"teams\":\"Juan Aurich - Tigres Uanl\",\"exactGoal\":\"-\",\"local\":\"1.50\",\"equal\":\"3.75\",\"visitor\":\"4.50\",\"localEqual\":\"1.07\",\"localVisitor\":\"1.13\",\"equalVisitor\":\"2.05\",\"t1tLocal\":\"2.10\",\"t1tEqual\":\"2.30\",\"t1tVisitor\":\"4.60\",\"t1tLocal2tLocal\":\"2.30\",\"t1tEqual2tLocal\":\"3.80\",\"t1tVisitor2tLocal\":\"24.00\",\"t1tLocal2tEqual\":\"20.00\",\"t1tEqual2tEqual\":\"6.00\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"34.00\",\"t1tEqual2tVisitor\":\"10.00\",\"t1tVisitor2tVisitor\":\"9.00\",\"goalLower2\":\"1.65\",\"goalOver3\":\"1.85\",\"goal_0_1\":\"3.00\",\"goal_2_3\":\"1.85\",\"goal4More\":\"2.75\"},{\"hour\":\"17:45\",\"eventId\":573,\"leagueId\":\"CLA\",\"minimun\":3,\"teams\":\"River Plate - San Jose Oruro\",\"exactGoal\":\"-\",\"local\":\"1.05\",\"equal\":\"7.50\",\"visitor\":\"15.00\",\"localEqual\":\"-\",\"localVisitor\":\"-\",\"equalVisitor\":\"5.00\",\"t1tLocal\":\"1.20\",\"t1tEqual\":\"3.30\",\"t1tVisitor\":\"12.00\",\"t1tLocal2tLocal\":\"1.25\",\"t1tEqual2tLocal\":\"4.60\",\"t1tVisitor2tLocal\":\"34.00\",\"t1tLocal2tEqual\":\"40.00\",\"t1tEqual2tEqual\":\"12.50\",\"t1tVisitor2tEqual\":\"21.00\",\"t1tLocal2tVisitor\":\"75.00\",\"t1tEqual2tVisitor\":\"37.00\",\"t1tVisitor2tVisitor\":\"34.00\",\"goalLower2\":\"2.20\",\"goalOver3\":\"1.40\",\"goal_0_1\":\"4.90\",\"goal_2_3\":\"1.95\",\"goal4More\":\"1.95\"},{\"hour\":\"19:10\",\"eventId\":574,\"leagueId\":\"PAR\",\"minimun\":3,\"teams\":\"Libertad - Depor Santani\",\"exactGoal\":\"-\",\"local\":\"1.25\",\"equal\":\"4.50\",\"visitor\":\"8.00\",\"localEqual\":\"-\",\"localVisitor\":\"1.08\",\"equalVisitor\":\"2.88\",\"t1tLocal\":\"-\",\"t1tEqual\":\"-\",\"t1tVisitor\":\"-\",\"t1tLocal2tLocal\":\"-\",\"t1tEqual2tLocal\":\"-\",\"t1tVisitor2tLocal\":\"-\",\"t1tLocal2tEqual\":\"-\",\"t1tEqual2tEqual\":\"-\",\"t1tVisitor2tEqual\":\"-\",\"t1tLocal2tVisitor\":\"-\",\"t1tEqual2tVisitor\":\"-\",\"t1tVisitor2tVisitor\":\"-\",\"goalLower2\":\"-\",\"goalOver3\":\"-\",\"goal_0_1\":\"-\",\"goal_2_3\":\"-\",\"goal4More\":\"-\"},{\"hour\":\"20:00\",\"eventId\":548,\"leagueId\":\"COL\",\"minimun\":3,\"teams\":\"Millonarios - Alianza Petrolera\",\"exactGoal\":\"-\",\"local\":\"1.40\",\"equal\":\"3.75\",\"visitor\":\"6.00\",\"localEqual\":\"-\",\"localVisitor\":\"1.14\",\"equalVisitor\":\"2.31\",\"t1tLocal\":\"-\",\"t1tEqual\":\"-\",\"t1tVisitor\":\"-\",\"t1tLocal2tLocal\":\"-\",\"t1tEqual2tLocal\":\"-\",\"t1tVisitor2tLocal\":\"-\",\"t1tLocal2tEqual\":\"-\",\"t1tEqual2tEqual\":\"-\",\"t1tVisitor2tEqual\":\"-\",\"t1tLocal2tVisitor\":\"-\",\"t1tEqual2tVisitor\":\"-\",\"t1tVisitor2tVisitor\":\"-\",\"goalLower2\":\"-\",\"goalOver3\":\"-\",\"goal_0_1\":\"-\",\"goal_2_3\":\"-\",\"goal4More\":\"-\"},{\"hour\":\"20:00\",\"eventId\":576,\"leagueId\":\"CLA\",\"minimun\":3,\"teams\":\"Atlas - Atletico Mg\",\"exactGoal\":\"-\",\"local\":\"2.70\",\"equal\":\"3.10\",\"visitor\":\"2.15\",\"localEqual\":\"1.44\",\"localVisitor\":\"1.20\",\"equalVisitor\":\"1.27\",\"t1tLocal\":\"3.40\",\"t1tEqual\":\"1.90\",\"t1tVisitor\":\"3.00\",\"t1tLocal2tLocal\":\"5.10\",\"t1tEqual2tLocal\":\"6.00\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"14.50\",\"t1tEqual2tEqual\":\"4.50\",\"t1tVisitor2tEqual\":\"15.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"4.90\",\"t1tVisitor2tVisitor\":\"4.10\",\"goalLower2\":\"1.55\",\"goalOver3\":\"1.95\",\"goal_0_1\":\"2.70\",\"goal_2_3\":\"1.80\",\"goal4More\":\"3.20\"},{\"hour\":\"20:00\",\"eventId\":577,\"leagueId\":\"CLA\",\"minimun\":3,\"teams\":\"Colo Colo - Deportiva Santa Fe\",\"exactGoal\":\"-\",\"local\":\"1.75\",\"equal\":\"3.20\",\"visitor\":\"3.60\",\"localEqual\":\"1.13\",\"localVisitor\":\"1.18\",\"equalVisitor\":\"1.69\",\"t1tLocal\":\"2.55\",\"t1tEqual\":\"1.90\",\"t1tVisitor\":\"4.40\",\"t1tLocal2tLocal\":\"2.90\",\"t1tEqual2tLocal\":\"4.20\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"15.50\",\"t1tEqual2tEqual\":\"4.60\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"29.00\",\"t1tEqual2tVisitor\":\"7.50\",\"t1tVisitor2tVisitor\":\"7.00\",\"goalLower2\":\"1.60\",\"goalOver3\":\"1.90\",\"goal_0_1\":\"2.90\",\"goal_2_3\":\"1.80\",\"goal4More\":\"2.90\"},{\"hour\":\"20:00\",\"eventId\":578,\"leagueId\":\"CLA\",\"minimun\":3,\"teams\":\"Danubio - Sao Paulo\",\"exactGoal\":\"-\",\"local\":\"6.00\",\"equal\":\"3.75\",\"visitor\":\"1.40\",\"localEqual\":\"2.31\",\"localVisitor\":\"1.14\",\"equalVisitor\":\"-\",\"t1tLocal\":\"5.50\",\"t1tEqual\":\"2.40\",\"t1tVisitor\":\"1.80\",\"t1tLocal2tLocal\":\"13.00\",\"t1tEqual2tLocal\":\"15.00\",\"t1tVisitor2tLocal\":\"50.00\",\"t1tLocal2tEqual\":\"14.50\",\"t1tEqual2tEqual\":\"6.25\",\"t1tVisitor2tEqual\":\"20.00\",\"t1tLocal2tVisitor\":\"24.00\",\"t1tEqual2tVisitor\":\"4.10\",\"t1tVisitor2tVisitor\":\"1.95\",\"goalLower2\":\"1.75\",\"goalOver3\":\"1.75\",\"goal_0_1\":\"3.50\",\"goal_2_3\":\"1.85\",\"goal4More\":\"2.45\"}]},{\"drawId\":1533,\"date\":\"Jueves 16 de abril de 2015\",\"events\":[{\"hour\":\"14:05\",\"eventId\":580,\"leagueId\":\"LDE\",\"minimun\":2,\"teams\":\"Club Brugge - Dnjepr\",\"exactGoal\":\"-\",\"local\":\"1.80\",\"equal\":\"3.20\",\"visitor\":\"3.50\",\"localEqual\":\"1.15\",\"localVisitor\":\"1.19\",\"equalVisitor\":\"1.67\",\"t1tLocal\":\"2.65\",\"t1tEqual\":\"1.90\",\"t1tVisitor\":\"4.40\",\"t1tLocal2tLocal\":\"3.00\",\"t1tEqual2tLocal\":\"4.20\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"15.50\",\"t1tEqual2tEqual\":\"4.60\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"29.00\",\"t1tEqual2tVisitor\":\"7.00\",\"t1tVisitor2tVisitor\":\"7.00\",\"goalLower2\":\"1.55\",\"goalOver3\":\"1.95\",\"goal_0_1\":\"2.90\",\"goal_2_3\":\"1.80\",\"goal4More\":\"2.90\"},{\"hour\":\"14:05\",\"eventId\":581,\"leagueId\":\"LDE\",\"minimun\":2,\"teams\":\"Dynamo Kiev - Fiorentina\",\"exactGoal\":\"-\",\"local\":\"2.30\",\"equal\":\"3.00\",\"visitor\":\"2.55\",\"localEqual\":\"1.30\",\"localVisitor\":\"1.21\",\"equalVisitor\":\"1.38\",\"t1tLocal\":\"3.10\",\"t1tEqual\":\"1.85\",\"t1tVisitor\":\"3.30\",\"t1tLocal2tLocal\":\"4.30\",\"t1tEqual2tLocal\":\"5.10\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"15.50\",\"t1tEqual2tEqual\":\"4.40\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"5.60\",\"t1tVisitor2tVisitor\":\"4.90\",\"goalLower2\":\"1.50\",\"goalOver3\":\"2.00\",\"goal_0_1\":\"2.60\",\"goal_2_3\":\"1.80\",\"goal4More\":\"3.40\"},{\"hour\":\"14:05\",\"eventId\":582,\"leagueId\":\"LDE\",\"minimun\":2,\"teams\":\"Sevilla - Zenit\",\"exactGoal\":\"-\",\"local\":\"1.60\",\"equal\":\"3.30\",\"visitor\":\"4.50\",\"localEqual\":\"1.08\",\"localVisitor\":\"1.18\",\"equalVisitor\":\"1.90\",\"t1tLocal\":\"2.15\",\"t1tEqual\":\"2.10\",\"t1tVisitor\":\"4.60\",\"t1tLocal2tLocal\":\"2.45\",\"t1tEqual2tLocal\":\"4.20\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"14.50\",\"t1tEqual2tEqual\":\"5.25\",\"t1tVisitor2tEqual\":\"13.50\",\"t1tLocal2tVisitor\":\"34.00\",\"t1tEqual2tVisitor\":\"10.00\",\"t1tVisitor2tVisitor\":\"9.00\",\"goalLower2\":\"1.75\",\"goalOver3\":\"1.75\",\"goal_0_1\":\"3.30\",\"goal_2_3\":\"1.85\",\"goal4More\":\"2.55\"},{\"hour\":\"14:05\",\"eventId\":583,\"leagueId\":\"LDE\",\"minimun\":2,\"teams\":\"Wolfsburgo - Napoli\",\"exactGoal\":\"exact-goal\",\"local\":\"1.60\",\"equal\":\"3.30\",\"visitor\":\"4.50\",\"localEqual\":\"1.08\",\"localVisitor\":\"1.18\",\"equalVisitor\":\"1.90\",\"t1tLocal\":\"2.10\",\"t1tEqual\":\"2.20\",\"t1tVisitor\":\"4.50\",\"t1tLocal2tLocal\":\"2.40\",\"t1tEqual2tLocal\":\"4.50\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"13.50\",\"t1tEqual2tEqual\":\"5.50\",\"t1tVisitor2tEqual\":\"12.50\",\"t1tLocal2tVisitor\":\"34.00\",\"t1tEqual2tVisitor\":\"10.00\",\"t1tVisitor2tVisitor\":\"9.00\",\"goalLower2\":\"2.00\",\"goalOver3\":\"1.50\",\"goal_0_1\":\"4.40\",\"goal_2_3\":\"1.95\",\"goal4More\":\"2.05\"},{\"hour\":\"16:00\",\"eventId\":584,\"leagueId\":\"PAR\",\"minimun\":3,\"teams\":\"Nacional Asuncion - Rubio Nu\",\"exactGoal\":\"-\",\"local\":\"1.60\",\"equal\":\"3.30\",\"visitor\":\"4.50\",\"localEqual\":\"1.08\",\"localVisitor\":\"1.18\",\"equalVisitor\":\"1.90\",\"t1tLocal\":\"-\",\"t1tEqual\":\"-\",\"t1tVisitor\":\"-\",\"t1tLocal2tLocal\":\"-\",\"t1tEqual2tLocal\":\"-\",\"t1tVisitor2tLocal\":\"-\",\"t1tLocal2tEqual\":\"-\",\"t1tEqual2tEqual\":\"-\",\"t1tVisitor2tEqual\":\"-\",\"t1tLocal2tVisitor\":\"-\",\"t1tEqual2tVisitor\":\"-\",\"t1tVisitor2tVisitor\":\"-\",\"goalLower2\":\"-\",\"goalOver3\":\"-\",\"goal_0_1\":\"-\",\"goal_2_3\":\"-\",\"goal4More\":\"-\"},{\"hour\":\"17:45\",\"eventId\":585,\"leagueId\":\"CLA\",\"minimun\":3,\"teams\":\"Boca Juniors - Palestino\",\"exactGoal\":\"-\",\"local\":\"1.20\",\"equal\":\"5.00\",\"visitor\":\"8.50\",\"localEqual\":\"-\",\"localVisitor\":\"1.05\",\"equalVisitor\":\"3.15\",\"t1tLocal\":\"1.60\",\"t1tEqual\":\"2.65\",\"t1tVisitor\":\"8.00\",\"t1tLocal2tLocal\":\"1.65\",\"t1tEqual2tLocal\":\"3.90\",\"t1tVisitor2tLocal\":\"24.00\",\"t1tLocal2tEqual\":\"27.00\",\"t1tEqual2tEqual\":\"8.50\",\"t1tVisitor2tEqual\":\"20.00\",\"t1tLocal2tVisitor\":\"60.00\",\"t1tEqual2tVisitor\":\"21.00\",\"t1tVisitor2tVisitor\":\"20.00\",\"goalLower2\":\"2.00\",\"goalOver3\":\"1.50\",\"goal_0_1\":\"4.10\",\"goal_2_3\":\"1.85\",\"goal4More\":\"2.20\"},{\"hour\":\"17:45\",\"eventId\":586,\"leagueId\":\"CLA\",\"minimun\":3,\"teams\":\"Zamora - M. Wanderers\",\"exactGoal\":\"-\",\"local\":\"2.45\",\"equal\":\"3.10\",\"visitor\":\"2.35\",\"localEqual\":\"1.37\",\"localVisitor\":\"1.20\",\"equalVisitor\":\"1.34\",\"t1tLocal\":\"3.20\",\"t1tEqual\":\"2.00\",\"t1tVisitor\":\"3.10\",\"t1tLocal2tLocal\":\"4.50\",\"t1tEqual2tLocal\":\"5.75\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"13.50\",\"t1tEqual2tEqual\":\"4.60\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"5.25\",\"t1tVisitor2tVisitor\":\"4.30\",\"goalLower2\":\"1.60\",\"goalOver3\":\"1.90\",\"goal_0_1\":\"2.75\",\"goal_2_3\":\"1.80\",\"goal4More\":\"3.15\"},{\"hour\":\"18:00\",\"eventId\":587,\"leagueId\":\"USA\",\"minimun\":3,\"teams\":\"New York City - Philadelphia\",\"exactGoal\":\"-\",\"local\":\"1.90\",\"equal\":\"3.10\",\"visitor\":\"3.20\",\"localEqual\":\"1.18\",\"localVisitor\":\"1.19\",\"equalVisitor\":\"1.57\",\"t1tLocal\":\"2.75\",\"t1tEqual\":\"1.90\",\"t1tVisitor\":\"3.90\",\"t1tLocal2tLocal\":\"3.30\",\"t1tEqual2tLocal\":\"4.50\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"15.50\",\"t1tEqual2tEqual\":\"4.50\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"29.00\",\"t1tEqual2tVisitor\":\"6.50\",\"t1tVisitor2tVisitor\":\"6.25\",\"goalLower2\":\"1.55\",\"goalOver3\":\"1.95\",\"goal_0_1\":\"2.85\",\"goal_2_3\":\"1.80\",\"goal4More\":\"3.00\"},{\"hour\":\"18:10\",\"eventId\":588,\"leagueId\":\"PAR\",\"minimun\":3,\"teams\":\"Depor Capiata - Olimpia Asuncion\",\"exactGoal\":\"-\",\"local\":\"2.90\",\"equal\":\"3.10\",\"visitor\":\"2.05\",\"localEqual\":\"1.50\",\"localVisitor\":\"1.20\",\"equalVisitor\":\"1.23\",\"t1tLocal\":\"-\",\"t1tEqual\":\"-\",\"t1tVisitor\":\"-\",\"t1tLocal2tLocal\":\"-\",\"t1tEqual2tLocal\":\"-\",\"t1tVisitor2tLocal\":\"-\",\"t1tLocal2tEqual\":\"-\",\"t1tEqual2tEqual\":\"-\",\"t1tVisitor2tEqual\":\"-\",\"t1tLocal2tVisitor\":\"-\",\"t1tEqual2tVisitor\":\"-\",\"t1tVisitor2tVisitor\":\"-\",\"goalLower2\":\"-\",\"goalOver3\":\"-\",\"goal_0_1\":\"-\",\"goal_2_3\":\"-\",\"goal4More\":\"-\"},{\"hour\":\"20:00\",\"eventId\":589,\"leagueId\":\"CLA\",\"minimun\":2,\"teams\":\"Corinthians - San Lorenzo\",\"exactGoal\":\"-\",\"local\":\"1.65\",\"equal\":\"3.30\",\"visitor\":\"4.00\",\"localEqual\":\"1.10\",\"localVisitor\":\"1.17\",\"equalVisitor\":\"1.81\",\"t1tLocal\":\"2.30\",\"t1tEqual\":\"1.95\",\"t1tVisitor\":\"4.50\",\"t1tLocal2tLocal\":\"2.75\",\"t1tEqual2tLocal\":\"3.90\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"15.50\",\"t1tEqual2tEqual\":\"5.10\",\"t1tVisitor2tEqual\":\"14.50\",\"t1tLocal2tVisitor\":\"34.00\",\"t1tEqual2tVisitor\":\"9.00\",\"t1tVisitor2tVisitor\":\"7.75\",\"goalLower2\":\"1.50\",\"goalOver3\":\"2.00\",\"goal_0_1\":\"2.55\",\"goal_2_3\":\"1.75\",\"goal4More\":\"3.80\"},{\"hour\":\"20:00\",\"eventId\":590,\"leagueId\":\"CLA\",\"minimun\":2,\"teams\":\"Univ. De Chile - Internacional\",\"exactGoal\":\"-\",\"local\":\"2.35\",\"equal\":\"3.10\",\"visitor\":\"2.45\",\"localEqual\":\"1.34\",\"localVisitor\":\"1.20\",\"equalVisitor\":\"1.37\",\"t1tLocal\":\"3.10\",\"t1tEqual\":\"2.00\",\"t1tVisitor\":\"3.20\",\"t1tLocal2tLocal\":\"4.30\",\"t1tEqual2tLocal\":\"5.25\",\"t1tVisitor2tLocal\":\"27.00\",\"t1tLocal2tEqual\":\"14.50\",\"t1tEqual2tEqual\":\"4.60\",\"t1tVisitor2tEqual\":\"13.50\",\"t1tLocal2tVisitor\":\"27.00\",\"t1tEqual2tVisitor\":\"5.75\",\"t1tVisitor2tVisitor\":\"4.50\",\"goalLower2\":\"1.70\",\"goalOver3\":\"1.80\",\"goal_0_1\":\"2.85\",\"goal_2_3\":\"1.80\",\"goal4More\":\"3.00\"}]}],\"ExactData\":[{\"drawId\":1531,\"eventId\":501,\"teamsMenu\":\"Juventus vs Monaco\",\"data\":{\"eventId\":501,\"date\":\"Martes 14 de abril de 2015\",\"hour\":\"13:45\",\"local\":\"JUVENTUS\",\"imageLocal\":\"juventus\",\"visitor\":\"MONACO\",\"imageVisitor\":\"monaco\",\"s00\":\"9.00\",\"s10\":\"4.60\",\"s20\":\"5.00\",\"s30\":\"10.00\",\"s40\":\"27.00\",\"s5More0\":\"27.00\",\"s21\":\"7.50\",\"s31\":\"14.00\",\"s41\":\"25.00\",\"s5More1\":\"27.00\",\"s32\":\"37.00\",\"s42\":\"100.00\",\"s5More2\":\"100.00\",\"s43\":\"150.00\",\"s5More3\":\"200.00\",\"s5More4\":\"300.00\",\"s11\":\"6.25\",\"s22\":\"31.00\",\"s33\":\"120.00\",\"s44\":\"200.00\",\"s5More5\":\"300.00\",\"s45More\":\"500.00\",\"s34\":\"300.00\",\"s35More\":\"400.00\",\"s23\":\"150.00\",\"s24\":\"300.00\",\"s25More\":\"300.00\",\"s12\":\"31.00\",\"s13\":\"150.00\",\"s14\":\"200.00\",\"s15More\":\"300.00\",\"s01\":\"15.00\",\"s02\":\"40.00\",\"s03\":\"150.00\",\"s04\":\"200.00\",\"s05More\":\"300.00\"}},{\"drawId\":1531,\"eventId\":500,\"teamsMenu\":\"Atletico Madrid vs Real Madrid\",\"data\":{\"eventId\":500,\"date\":\"Martes 14 de abril de 2015\",\"hour\":\"13:45\",\"local\":\"ATLETICO MADRID\",\"imageLocal\":\"atleticomadrid\",\"visitor\":\"REAL MADRID\",\"imageVisitor\":\"realmadrid\",\"s00\":\"8.50\",\"s10\":\"8.50\",\"s20\":\"13.00\",\"s30\":\"30.00\",\"s40\":\"100.00\",\"s5More0\":\"120.00\",\"s21\":\"9.50\",\"s31\":\"26.00\",\"s41\":\"90.00\",\"s5More1\":\"100.00\",\"s32\":\"32.00\",\"s42\":\"120.00\",\"s5More2\":\"100.00\",\"s43\":\"150.00\",\"s5More3\":\"200.00\",\"s5More4\":\"400.00\",\"s11\":\"5.75\",\"s22\":\"14.00\",\"s33\":\"60.00\",\"s44\":\"200.00\",\"s5More5\":\"300.00\",\"s45More\":\"400.00\",\"s34\":\"150.00\",\"s35More\":\"200.00\",\"s23\":\"32.00\",\"s24\":\"100.00\",\"s25More\":\"100.00\",\"s12\":\"9.00\",\"s13\":\"24.00\",\"s14\":\"70.00\",\"s15More\":\"90.00\",\"s01\":\"7.50\",\"s02\":\"13.00\",\"s03\":\"28.00\",\"s04\":\"90.00\",\"s05More\":\"120.00\"}},{\"drawId\":1531,\"eventId\":547,\"teamsMenu\":\"Sporting Cristal vs Guarani Asuncion\",\"data\":{\"eventId\":547,\"date\":\"Martes 14 de abril de 2015\",\"hour\":\"19:15\",\"local\":\"SPORTING CRISTAL\",\"imageLocal\":\"sportingcristal\",\"visitor\":\"GUARANI ASUNCION\",\"imageVisitor\":\"guaraniasuncion\",\"s00\":\"8.00\",\"s10\":\"6.50\",\"s20\":\"9.00\",\"s30\":\"22.00\",\"s40\":\"70.00\",\"s5More0\":\"90.00\",\"s21\":\"8.00\",\"s31\":\"20.00\",\"s41\":\"65.00\",\"s5More1\":\"80.00\",\"s32\":\"28.00\",\"s42\":\"90.00\",\"s5More2\":\"100.00\",\"s43\":\"150.00\",\"s5More3\":\"200.00\",\"s5More4\":\"300.00\",\"s11\":\"5.75\",\"s22\":\"15.00\",\"s33\":\"70.00\",\"s44\":\"200.00\",\"s5More5\":\"300.00\",\"s45More\":\"500.00\",\"s34\":\"200.00\",\"s35More\":\"300.00\",\"s23\":\"40.00\",\"s24\":\"200.00\",\"s25More\":\"200.00\",\"s12\":\"12.00\",\"s13\":\"35.00\",\"s14\":\"120.00\",\"s15More\":\"200.00\",\"s01\":\"9.00\",\"s02\":\"15.00\",\"s03\":\"45.00\",\"s04\":\"120.00\",\"s05More\":\"200.00\"}},{\"drawId\":1532,\"eventId\":550,\"teamsMenu\":\"Paris St. Germain vs Barcelona\",\"data\":{\"eventId\":550,\"date\":\"Miércoles 15 de abril de 2015\",\"hour\":\"13:45\",\"local\":\"PARIS ST. GERMAIN\",\"imageLocal\":\"parisstgermain\",\"visitor\":\"BARCELONA\",\"imageVisitor\":\"barcelona\",\"s00\":\"9.00\",\"s10\":\"11.00\",\"s20\":\"20.00\",\"s30\":\"50.00\",\"s40\":\"150.00\",\"s5More0\":\"200.00\",\"s21\":\"14.00\",\"s31\":\"40.00\",\"s41\":\"150.00\",\"s5More1\":\"200.00\",\"s32\":\"40.00\",\"s42\":\"150.00\",\"s5More2\":\"200.00\",\"s43\":\"200.00\",\"s5More3\":\"400.00\",\"s5More4\":\"500.00\",\"s11\":\"6.00\",\"s22\":\"14.00\",\"s33\":\"60.00\",\"s44\":\"200.00\",\"s5More5\":\"300.00\",\"s45More\":\"300.00\",\"s34\":\"150.00\",\"s35More\":\"200.00\",\"s23\":\"24.00\",\"s24\":\"70.00\",\"s25More\":\"70.00\",\"s12\":\"8.00\",\"s13\":\"14.00\",\"s14\":\"40.00\",\"s15More\":\"50.00\",\"s01\":\"7.50\",\"s02\":\"9.50\",\"s03\":\"15.00\",\"s04\":\"45.00\",\"s05More\":\"60.00\"}},{\"drawId\":1532,\"eventId\":551,\"teamsMenu\":\"Porto vs Bayern\",\"data\":{\"eventId\":551,\"date\":\"Miércoles 15 de abril de 2015\",\"hour\":\"13:45\",\"local\":\"PORTO\",\"imageLocal\":\"porto\",\"visitor\":\"BAYERN\",\"imageVisitor\":\"bayern\",\"s00\":\"8.50\",\"s10\":\"12.00\",\"s20\":\"26.00\",\"s30\":\"100.00\",\"s40\":\"200.00\",\"s5More0\":\"200.00\",\"s21\":\"20.00\",\"s31\":\"70.00\",\"s41\":\"200.00\",\"s5More1\":\"200.00\",\"s32\":\"70.00\",\"s42\":\"150.00\",\"s5More2\":\"200.00\",\"s43\":\"200.00\",\"s5More3\":\"300.00\",\"s5More4\":\"500.00\",\"s11\":\"6.50\",\"s22\":\"18.00\",\"s33\":\"80.00\",\"s44\":\"200.00\",\"s5More5\":\"300.00\",\"s45More\":\"300.00\",\"s34\":\"150.00\",\"s35More\":\"200.00\",\"s23\":\"26.00\",\"s24\":\"80.00\",\"s25More\":\"80.00\",\"s12\":\"7.25\",\"s13\":\"13.00\",\"s14\":\"32.00\",\"s15More\":\"40.00\",\"s01\":\"6.00\",\"s02\":\"6.75\",\"s03\":\"13.00\",\"s04\":\"35.00\",\"s05More\":\"50.00\"}},{\"drawId\":1533,\"eventId\":583,\"teamsMenu\":\"Wolfsburgo vs Napoli\",\"data\":{\"eventId\":583,\"date\":\"Jueves 16 de abril de 2015\",\"hour\":\"14:05\",\"local\":\"WOLFSBURGO\",\"imageLocal\":\"wolfsburgo\",\"visitor\":\"NAPOLI\",\"imageVisitor\":\"napoli\",\"s00\":\"13.00\",\"s10\":\"10.00\",\"s20\":\"9.50\",\"s30\":\"11.00\",\"s40\":\"26.00\",\"s5More0\":\"30.00\",\"s21\":\"8.50\",\"s31\":\"10.00\",\"s41\":\"24.00\",\"s5More1\":\"26.00\",\"s32\":\"22.00\",\"s42\":\"60.00\",\"s5More2\":\"70.00\",\"s43\":\"120.00\",\"s5More3\":\"200.00\",\"s5More4\":\"300.00\",\"s11\":\"6.50\",\"s22\":\"11.00\",\"s33\":\"50.00\",\"s44\":\"150.00\",\"s5More5\":\"300.00\",\"s45More\":\"500.00\",\"s34\":\"200.00\",\"s35More\":\"300.00\",\"s23\":\"50.00\",\"s24\":\"150.00\",\"s25More\":\"200.00\",\"s12\":\"14.00\",\"s13\":\"45.00\",\"s14\":\"200.00\",\"s15More\":\"200.00\",\"s01\":\"18.00\",\"s02\":\"26.00\",\"s03\":\"50.00\",\"s04\":\"200.00\",\"s05More\":\"200.00\"}}],\"SpecialData\":[{\"header\":\"FUTBOL\",\"name\":\"Fútbol\",\"data\":[]}]}");
            JSONObject jsonObject = (JSONObject) obj;
            JSONArray drawDataJsonList = (JSONArray) jsonObject.get("DrawData");
            List<Programa> programaList = new ArrayList<Programa>();
            for (Object aDrawDataJsonList : drawDataJsonList) {
                JSONObject drawDataJson = (JSONObject) aDrawDataJsonList;
                Programa programa = new Programa();
                programa.setDrawId((Long) drawDataJson.get("drawId"));
                programa.setDate((String) drawDataJson.get("date"));
                programa.setFecha(sdf.parse(programa.getDate()));
                List<Evento> eventList = new ArrayList<Evento>();
                JSONArray eventJsonList = (JSONArray) drawDataJson.get("events");
                for (Object aEventJsonList : eventJsonList) {
                    JSONObject eventoJson = (JSONObject) aEventJsonList;
                    Set propertyNameList = eventoJson.keySet();
                    Evento evento = null;
                    evento = eventoRepository.findOne(new EventoPK(programa.getDrawId(), (Long) eventoJson.get("eventId")));
                    if (evento == null) {
                        evento = new Evento();
                    }
                    evento.setDrawId(programa.getDrawId());
                    evento.setFecha(sdf_1.parse(sdf_2.format(sdf.parse(programa.getDate())) + " " + eventoJson.get("hour")));
                    BeanWrapper bw = new BeanWrapperImpl(evento);
                    for (Object aPropertyNameList : propertyNameList) {
                        String propertyName = (String) aPropertyNameList;
                        bw.setPropertyValue(propertyName, eventoJson.get(propertyName));
                    }
                    eventList.add(evento);
                }
                programa.setEventos(new HashSet<Evento>(eventList));
                programaList.add(programa);
            }
            Set<Evento> eventos = new HashSet<Evento>();
            for (Programa programa : programaList) {
                drawDataRepository.save(programa);
                eventos.addAll(programa.getEventos());
            }

            for (Evento evento : eventos) {
                evento.init();
                eventoRepository.save(evento);
            }
            LOG.info("Total de eventos actualizados <" + eventos.size() + ">");

        } catch (Exception e) {
            LOG.error("Error al descargar programa ", e);
        }
    }


    public void asignarResultadoFinal(String leagueId) {
        List<TeApuestoRsl> eventList = eventoQryMapper.getUltEventosListSinRF(leagueId);
        for (TeApuestoRsl teApuestoRsl : eventList) {
            completarBeansEquiposBase(teApuestoRsl);
            asignarResultadoFinalIntern(teApuestoRsl);
        }
    }

    @Transactional
    public void calcularResultados(List<TeApuestoRsl> resultList) {
        for (TeApuestoRsl teApuestoRsl : resultList) {
            teApuestoRsl.calcularResultadoFinal(new BigDecimal(50));
            EventoPK eventoPK = new EventoPK(teApuestoRsl.getDrawId(), teApuestoRsl.getEventId());
            Evento evento = eventoRepository.findOne(eventoPK);
            if (StringUtils.isBlank(evento.getResultSimple())) {
                evento.setResultSimple(teApuestoRsl.getResultSimple());
            }
            if (StringUtils.isBlank(evento.getResultDoble())) {
                evento.setResultDoble(teApuestoRsl.getResultDoble());
            }
            eventoRepository.save(evento);
        }
    }

    @Transactional
    public void asignarJugada(TeApuestoRsl teApuestoRsl) {
        EventoPK eventoPK = new EventoPK(teApuestoRsl.getDrawId(), teApuestoRsl.getEventId());
        Evento evento = eventoRepository.findOne(eventoPK);
        evento.setResultSimple(teApuestoRsl.getResultSimple());
        evento.setResultDoble(teApuestoRsl.getResultDoble());
        eventoRepository.save(evento);
    }

    private Evento buscarEvento(Fecha fecha) throws Exception {

        Equipo equipo1 = equipoService.searchEquipos(fecha.getLiga(), fecha.getEquipo1());
        Equipo equipo2 = equipoService.searchEquipos(fecha.getLiga(), fecha.getEquipo2());

        if (equipo1 == null || equipo2 == null) return null;

        String[] equipo1List = StringUtils.split(equipo1.getNombre() + ";" + equipo1.getAlias_intralot(), ";");
        String[] equipo2List = StringUtils.split(equipo2.getNombre() + ";" + equipo2.getAlias_intralot(), ";");

        List<Evento> eventoList = new ArrayList<Evento>();
        for (String anEquipo1List : equipo1List) {
            for (String anEquipo2List : equipo2List) {
                LOG.info("search -> evento <" + anEquipo1List + "> vs <" + anEquipo2List + ">");
                eventoList.addAll(eventoRepository.buscarEvento(
                        fecha.getLiga(),
                        anEquipo1List,
                        anEquipo2List
                ));
            }

        }
        if (eventoList.size() == 0) return null;

        SimpleDateFormat sdf = new SimpleDateFormat("MM/yyyy");
        for (Evento evento : eventoList) {
            if (sdf.format(fecha.getFecha()).equals(sdf.format(evento.getFecha()))) {
                return evento;
            }
        }
        return null;
    }

    public EventoInfo obtenerEventoInfo(final TeApuestoRsl teApuestoRsl) {

        List<FechaBean> localFechaPreList = new ArrayList<FechaBean>();

        List<FechaBean> visitaFechaPreList = new ArrayList<FechaBean>();

        Map filtro = new HashMap();
        if (teApuestoRsl.getEquipoLocal() != null) {
            String[] equipo1List = StringUtils.split(teApuestoRsl.getEquipoLocal().getNombreLiveScore(), ";");
            for (String anEquipo1List : equipo1List) {
                filtro = new HashMap();
                filtro.put("liga", teApuestoRsl.getLeagueNombre());
                filtro.put("local", anEquipo1List);

                localFechaPreList = fechaQryMapper.buscarFecha(filtro);

                if (localFechaPreList.size() > 0) break;
            }
            if (localFechaPreList.size() == 0) {
                for (String anEquipo1List : equipo1List) {
                    filtro = new HashMap();
                    filtro.put("local", anEquipo1List);
                    localFechaPreList = fechaQryMapper.buscarFecha(filtro);
                    if (localFechaPreList.size() > 0) break;

                }
            }
        }
        if (teApuestoRsl.getEquipoVisita() != null) {
            String[] equipo2List = StringUtils.split(teApuestoRsl.getEquipoVisita().getNombreLiveScore(), ";");
            for (String anEquipo2List : equipo2List) {
                filtro = new HashMap();
                filtro.put("liga", teApuestoRsl.getLeagueNombre());
                filtro.put("visita", anEquipo2List);
                visitaFechaPreList = fechaQryMapper.buscarFecha(filtro);
                if (visitaFechaPreList.size() > 0) break;
            }
            if (visitaFechaPreList.size() == 0) {
                for (String anEquipo2List : equipo2List) {
                    filtro = new HashMap();
                    filtro.put("visita", anEquipo2List);
                    visitaFechaPreList = fechaQryMapper.buscarFecha(filtro);
                    if (visitaFechaPreList.size() > 0) break;
                }
            }
        }

        Collection<TeApuestoRsl> localFechaBeanList = Collections2.transform(localFechaPreList, new Function<FechaBean, TeApuestoRsl>() {
            public TeApuestoRsl apply(FechaBean fecha) {
                TeApuestoRsl result = new TeApuestoRsl();
                TeApuestoFlt filtro = new TeApuestoFlt();
                filtro.setDrawId(fecha.getDrawId());
                filtro.setEventId(fecha.getEventId());

                try {
                    if (filtro.getDrawId() == null && filtro.getEventId() == null) {
                        Fecha fecha1 = new Fecha();
                        BeanUtils.copyProperties(fecha, fecha1);

                        Evento evento = buscarEvento(fecha1);
                        if (evento == null) {
                            analisisService.execute(fecha1);
                            BeanUtils.copyProperties(fecha1, fecha);
                            result.setFechaBean(fecha);
                        } else {
                            filtro.setDrawId(evento.getDrawId());
                            filtro.setEventId(evento.getEventId());
                            List<TeApuestoRsl> resultList = eventoQryMapper.getEventoList(filtro);
                            if (resultList.size() > 0) {
                                result = resultList.get(0);
                                completarBeansEquipos(result);
                            }
                            if (result.getFechaBean() == null) {
                                result.setFechaBean(fecha);
                            }


                        }

                    } else {
                        List<TeApuestoRsl> resultList = eventoQryMapper.getEventoList(filtro);
                        if (resultList.size() > 0) {
                            result = resultList.get(0);
                            completarBeansEquipos(result);
                        } else {
                            result.setFechaBean(fecha);
                        }
                    }
                } catch (Exception e) {
                    LOG.error("Equipo no encontrado obtenerEventoInfo " + fecha.getEquipo2());
                }
                return result;
            }
        });

        Collection<TeApuestoRsl> visitaFechaBeanList = Collections2.transform(visitaFechaPreList, new Function<FechaBean, TeApuestoRsl>() {
            public TeApuestoRsl apply(FechaBean fecha) {
                TeApuestoRsl result = new TeApuestoRsl();
                TeApuestoFlt filtro = new TeApuestoFlt();
                filtro.setDrawId(fecha.getDrawId());
                filtro.setEventId(fecha.getEventId());

                try {
                    if (filtro.getDrawId() == null || filtro.getEventId() == null) {
                        Fecha fecha1 = new Fecha();
                        BeanUtils.copyProperties(fecha, fecha1);
                        Evento evento = buscarEvento(fecha1);
                        if (evento == null) {
                            analisisService.execute(fecha1);
                            BeanUtils.copyProperties(fecha1, fecha);
                            result.setFechaBean(fecha);
                        } else {
                            filtro.setDrawId(evento.getDrawId());
                            filtro.setEventId(evento.getEventId());
                            List<TeApuestoRsl> resultList = eventoQryMapper.getEventoList(filtro);
                            if (resultList.size() > 0) {
                                result = resultList.get(0);
                                completarBeansEquipos(result);
                            } else {
                                result.setFechaBean(fecha);
                            }
                        }

                    } else {
                        List<TeApuestoRsl> resultList = eventoQryMapper.getEventoList(filtro);
                        if (resultList.size() > 0) {
                            result = resultList.get(0);
                            completarBeansEquipos(result);
                        } else {
                            result.setFechaBean(fecha);
                        }
                    }
                } catch (Exception e) {
                    LOG.error("Equipo no encontrado obtenerEventoInfo " + fecha.getEquipo2());
                }
                return result;
            }
        });
        DecimalFormat df = new DecimalFormat("##0.00");
        EventoInfo result = new EventoInfo();
        result.setEquipoLocal(teApuestoRsl.getEquipoLocal());
        result.setEquipoVisita(teApuestoRsl.getEquipoVisita());
        result.setEvento(teApuestoRsl);
        if (teApuestoRsl.getEquipoLocal() != null && teApuestoRsl.getEquipoVisita() != null) {
            result.setLocalAvgScored(df.format(teApuestoRsl.getEquipoLocal().getLocal_avg_scored().doubleValue() / teApuestoRsl.getEquipoLocal().getLocal_partidos()));
            result.setLocalAvgScoredUlt(df.format(teApuestoRsl.getEquipoLocal().getLocal_avg_scored_ult().doubleValue() / teApuestoRsl.getEquipoLocal().getLocal_partidos_ult()));
            result.setVisitaAvgScored(df.format(teApuestoRsl.getEquipoVisita().getVisita_avg_scored().doubleValue() / teApuestoRsl.getEquipoVisita().getVisita_partidos()));
            result.setVisitaAvgScoredUlt(df.format(teApuestoRsl.getEquipoVisita().getVisita_avg_scored_ult().doubleValue() / teApuestoRsl.getEquipoVisita().getVisita_partidos_ult()));
            result.setLocalAvgConceded(df.format(teApuestoRsl.getEquipoLocal().getLocal_avg_conceded().doubleValue() / teApuestoRsl.getEquipoLocal().getLocal_partidos()));
            result.setLocalAvgConcededUlt(df.format(teApuestoRsl.getEquipoLocal().getLocal_avg_conceded_ult().doubleValue() / teApuestoRsl.getEquipoLocal().getLocal_partidos_ult()));
            result.setVisitaAvgConceded(df.format(teApuestoRsl.getEquipoVisita().getVisita_avg_conceded().doubleValue() / teApuestoRsl.getEquipoVisita().getVisita_partidos()));
            result.setVisitaAvgConcededUlt(df.format(teApuestoRsl.getEquipoVisita().getVisita_avg_conceded_ult().doubleValue() / teApuestoRsl.getEquipoVisita().getVisita_partidos_ult()));
            result.setAvg3(df.format(NumberUtil.nvl(teApuestoRsl.getEquipoLocal().getLocal_avg_3()).doubleValue() * 100) + "/" + df.format(NumberUtil.nvl(teApuestoRsl.getEquipoVisita().getVisita_avg_3()).doubleValue() * 100));
            result.setAvg3Ult(df.format(NumberUtil.nvl(teApuestoRsl.getEquipoLocal().getLocal_avg_3_ult()).doubleValue() * 100) + "/" + df.format(NumberUtil.nvl(teApuestoRsl.getEquipoVisita().getVisita_avg_3_ult()).doubleValue() * 100));
        }
        result.setLocalFechaList(new ArrayList<TeApuestoRsl>(localFechaBeanList));
        result.setVisitaFechaList(new ArrayList<TeApuestoRsl>(visitaFechaBeanList));
        return result;
    }


}
